End of page resizing fix