It may sometimes happen that a contract is illegal when it is made either because of the illegal purpose of the parties to the contract or for other reasons, and that when the contract is performed the transaction has become lawful either because the purpose of the parties has changed or because changes in the law or other external circumstances have made that lawful which was previously unlawful. It does not impair the validity of a sale when made that the prior contract to make it was illegal; 52 but if a contract originally illegal still remains executory, a subsequent change of the law, permitting such contracts to be made, will not ordinarily justify recovery.53 It is within the power of a legislature, however, to validate existing contracts made in violation of the law theretofore in force, and this construction has generally, been given to statutes repealing usury laws.54

49 See L. R. A. 1918 C. 247.

50 Kuhe v. McGally Universal Press Co., 123 Ala. 452, 26 So. 636, 82 Am. St. 136. Cf. Michael v. Bacon, 49 Mo. 474, 8 Am. Rep. 138, where recovery was allowed for fitting up a gambling house; and Greenland 0. Mitchell, 3 Alaska, 271, where recovery was allowed for building such a house, and see supra, Sec. 1681.

51 See Cowan v. Milbourn, L. R. 2 Ex. 230; Church v. Proctor, 66 Fed. Rep. 240, 244, 33 U. S. App. 1, 13 C. C. A. 426; Foley Mfg. Co. v. Sierra Nevada Lumber Co., 172 Fed. 197, 96 C. C. A. 649. But see O'Brien v. Brietenbach, 1 Hilt. 304.