fixed 90 degree image rotation bug