Fixed bugs of Flipping