Fix of not closed iterator.