Fix the inference of type.