Where an agreement was made to pay plaintiff $800, if he secured a certain loan for defendant on its property, which sum was to cover all fees, lawyers' charges, disbursements, etc., it was error to grant a judgment for the full amount, where performance was prevented by reason of defendant's defective title. Gatling v. Central Spar Verein, 73 N. Y. S. 496, 67 App. D. 50; Finch v. Pierce, 103 N. Y. S. 765, 53 Misc. 554. See also Sec. 572.