corrects var_type stuff