Fixed uninitialized for loop