Bug fix

Fixed loading data for last page.
Changed function loading data for first page.