bug fixing paging queries.