Fixed paging to last page

Covered all pagination cases with tests