Fix syntax error in loop iterators