Fix bug on auto rotate from exif data