Fix early abort error with iterators