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.
The sentence that has a mismatch between subject and modifier is the first one - Though not the prettiest one at the fair, I was sure my cake was the tastiest. The way this sentence is written, it would seem that the person talking was not the prettiest one at the fair, when this in fact refers to the cake.