Fixed rotate bug