fix some stuff with paging