fix rotation of images