Fixed teh for loop