fixed an issue with iterators