Fix loop variable type.