delivered the opinion of the court:
Plaintiffs brought suit to recover damages allegedly arising from defendant’s breach of contract specifications for the construction of their new home. The agreement was in writing and incorporated specifications supplied by defendant which required that all “roof sheathing [be] covered with 15 lb. felt building paper properly lapped,” and that all work be performed “in a 0 6 ” workmanlike manner equal to the best in current ” ” # field practice.” Plaintiffs alleged that after they had paid defendant in full and taken possession, they experienced difficulty with roof leaks that caused water stains on the living room ceiling, and in attempting repair, discovered that the felt underlayment between the roof sheathing and shingles had not been installed. For this breach, they alleged a right of recovery in the amount of *2000 plus costs. After a hearing before the court, the circuit judge found that defendant breached the written agreement by failure to install the felt underlayment but concluded that the proof does not support the claim that this deficiency was the cause of the leakage. A final judgment order was entered for defendant, and plaintiffs appeal.
Defendant’s exhibit 2, which purports to be a conditional release between the parties of all contract claims, and which appears also to have been executed at the time plaintiffs took possession, was received in evidence over plaintiffs’ objection. The objection made was that such affirmative matter should have been pleaded pursuant to section 43(4) of the Civil Practice Act (Ill. Rev. Stat. 1975, ch. 110, par. 43(4)), or raised by motion under section 48(f) of the Civil Practice Act (Ill. Rev. Stat. 1975, ch. 110, par. 48(f)). Although the instrument was admitted, however, it seems apparent from the record that the circuit judge accorded it no weight. We agree that where testimony is received tending to support a defense of release, an order for defendant cannot be rested upon such defense where it was not pleaded. (Darner v. Browne, 84 Ill. App. 2d 72, 228 N.E.2d 465 (1st Dist. 1967).) To decide otherwise would deprive plaintiffs the right of notice as to the issues they must meet.
While the evidence was conflicting as to whether the underlayment was installed, we conclude that the record amply supports the finding of the circuit judge that it was not installed. Without detailing the evidence in respect to the probable causes of the leakage, we also agree that the proof offered to establish a causal relationship between the sheathing deficiency and the water leakage was less than convincing and satisfactory and that the circuit judge correctly disallowed recovery for the costs of repainting plaintiffs’ ceiling.
Although we are obliged to accept the foregoing findings as true, we are nonetheless persuaded that the court partially erred in its conclusions of law made on those findings. Where as here, the proof shows that defendant contractor breached his building agreement by failing to perform as required by the specifications which he himself supplied, then plaintiffs were entitled to recover the reasonable cost of correcting that default. (Broncata v. Timbercrest Estates, Inc., 100 Ill. App. 2d 49, 241 N.E.2d 569 (1st Dist. 1968).) Where the defect, as here, was a latent one not discovered until several years after possession was taken, we are unimpressed by defendant’s argument that by reason of inflationary or other factors, something less than prevailing reasonable costs of repair would be applicable.
Although defendant correctly argues that the issue of what constitutes substantial performance of an agreement is a question of fact, he errs in supposing that the circuit judge resolved that issue in his favor and that the proof would support such a finding. We do not accept the contention that a total failure on the part of a building contractor to comply with one of the requirements of written specifications he himself supplied, can in any circumstances, be justly deemed a substantial performance. The uncontroverted proof shows that the prevailing reasonable cost of correcting defendant’s omission is *1200. Judgment ought to have been awarded plaintiffs in that amount.
For the reasons stated the cause is reversed and remanded with instructions to enter judgment for plaintiffs and against defendant in the amount of *1200 plus costs.
Reversed and remanded with instructions.
ALLOY, P. J., and STOUDER, J., concur.