Another for loop fix

Hopefully the last one!