Pagination issue

Fix to the pagination issue