Fixed image orientation bug