make sure we close the iterators after we query