Fixed i variable assignment