Fix a type_mismatch exception.