Which has a mismatch between subject and modifier?

Though not the prettiest one at the fair, I was sure my cake was the tastiest.

Though it wasn't the prettiest one at the fair, I was sure my cake was the tastiest.

Though not the prettiest one at the fair, my cake was the tastiest, I was sure.