The rescission of a written contract may be adjudged on the application of the party aggrieved: 1. In any of the cases mentioned in section 9-09-02; 2. When the contract is unlawful for causes not apparent upon its face and when the parties were not equally in fault; or 3. When the public interest will be prejudiced by permitting it to stand.