paging is working now
fix various issues with paging