Fixed a typo in the for loop