2. Whenever a law of this kind impairs the obligation of contracts, it is void. 3 Dall. 391. But laws which only vary the remedies, divest no right, but merely cure a defect in proceedings otherwise fair, are valid. 10 Serg. & Rawle, 102, 3; 15 Serg. & Rawle, 72. See Ex post facto.