Repair the type soundness proof.