rotate bug fix