fixed rotate bug