Fix typo in for loop