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, lawyer's 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. Gattling v. Central Spar Verein, 73 N. Y. S. 496,. 67 App. Div. 50. See also Sec. 572.