Fixed typo in for loop