fix the photo rotation bug