Improved QueryIterator