Fix bugs when size of a page is smaller than frame of the scrollview