Fixed for loop variable type generation