Fixed issues in Pagination