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.