variable type correction