fixed some paging bugs