Incorrect orientation of images in gallery fixed