fix bugs about rotation