Fixed an empty for loop error