fix the screen rotate bugs