Pagination issues fixed