fixed getIterator returns error variable