better handling of query proxy in pagination