Fixed a bug with the query pager.