Actually fixed indexing problem with iterators