Fixes the iterator and actually compiles