fixed error with wrong number of fetched values with paging