Added ghost flipping