Correcting variable types