Fixed a For loop error