fix: don't change iterator in loop