fix issues with paging back and forth