Provided correct var in for loop