Fix rotate bug.