Fix bug on rotation and decrease count of layout requests

Sorry for formatting issues