much better handling of photo flipping