Added missing var in loop variable.