fix to for loop variable