Corrected for loop syntax.