Fixed error in iterator.