fix rotate bug