Corrected background flipping