Fix nditerator issues