Fixed for loop syntax