I have to reset the previousPrefix and the iterator in case of an empty query.That's what I had in mind.