Fix bug with rotate screen