fixes to paging