Fix image orientation saving problem