Implemented correct behaviour for QueryPaginator.