Pagination bugfixes mostly