fixed issues with paging