Added special case of rotated pages