Fix wrong page position when rotating