Fixed a bug with the rotation of the screen