
598 A.2d 1181 (1991)
POND COVE MILLWORK COMPANY, et al.
v.
Joan T. STEEVES, et al.
Supreme Judicial Court of Maine.
Argued September 20, 1991.
Decided October 30, 1991.
Sidney St. F. Thaxter, John Gleason, Christian Chandler, (orally), Curtis, Thaxter, Stevens, Broder & Micholeau, William H. Leete, (orally), Beagle, Pearce, Feller & Ridge, Portland, for plaintiffs.
Peter Rubin, (orally), Diane Lukac, Bernstein, Shur, Sawyer & Nelson, Portland, for defendants.
Before McKUSICK, C.J., and ROBERTS, WATHEN, GLASSMAN, CLIFFORD and COLLINS, JJ.
ROBERTS, Justice.
Defendants Joan T. Steeves and James L. Swartz (homeowners) appeal a judgment of the Superior Court (Cumberland County, Perkins, J.) ordering them to pay Pond Cove Millwork Co. $8,913.70, Equity Plumbing & Heating, Inc. $6,943.00, and Bay Electric Co. $4,995.45 (subcontractors). On appeal the homeowners contend that there was no "balance due" to the general contractor after they received notice of the mechanics' liens and, therefore, they are entitled to the double payment defense provided in 10 M.R.S.A. § 3255(3) (1975). Because the record establishes that there was no balance due on the contract when the homeowners received notice of the liens, we vacate the judgment and remand for the entry of a judgment for the homeowners.
In September 1986, homeowners entered into a contract with IBIS Construction Co. (IBIS), the general contractor, for the construction of a house. The subcontractors contracted with IBIS to supply services and materials for the completion of the house. IBIS, however, failed to pay the subcontractors for their work.[1] The subcontractors *1182 each filed timely Certificates of Lien in the Cumberland County Registry of Deeds. The homeowners received notice of the lien claims no earlier than December 17, 1987. The subcontractors brought separate actions to enforce the liens and the actions were later consolidated for trial. The case was submitted to the court on an agreed statement of facts.
Upon substantial completion of the contract, IBIS claimed it was owed $65,238 on the contract, and the homeowners claimed they were owed $100,000 for IBIS's breach of the contract. Almost one year later, in November 1988, the homeowners and IBIS agreed to a settlement wherein IBIS paid the homeowners $20,000 in cash and released its claim for $65,238 against the homeowners. The agreement also provided that the homeowners did not owe IBIS any money on October 1, 1987, the date of substantial completion of the house.
The Mechanics' Lien Statute affords a "double payment" defense to a homeowner when persons who have furnished material and services independently to the homeowner's contractor seek enforcement of their liens. 10 M.R.S.A. § 3255(3).[2] No obligation arises on the part of the homeowner to such materialmen until after receipt of a notice of the lien. After the homeowner's receipt of a notice of the lien, the statute provides that the lien may be enforced against the property affected to the extent of the "balance due" by the homeowner to the person with whom he has directly contracted. Id. This provision sets up the maximum pool from which the subcontractors can seek enforcement of their liens.[3] In the circumstances of this case there was no balance due when the homeowners received notice of the liens. In fact, the subcontractors acknowledge by their own stipulation that any balance due was subject to claims for poor workmanship.[4]
The amount of compensation to which a builder is entitled may be subject to deductions or setoffs in favor of the homeowner for expenses incurred or damages sustained, because the builder did not perform in accordance with the terms of the contract. 17A C.J.S. Contracts § 368 (1963). Thus whether there is a balance due is a question of fact to be decided *1183 taking into account work done less the amount for not performing properly. See generally Giles v. Robinson, 114 Me. 552, 96 A. 745 (1916). In this case, the amended contract provided that IBIS would cover the cost of any work not completed by September 10, 1987, as well as a liquidated damages clause for any delay in completion. The amount due at the completion of the contract was thus explicitly made conditional on satisfactory completion of the contract. Stipulation 34 reflects the state of affairs as they existed on October 1, 1987, and it establishes that not all of the contract provisions were fulfilled. Therefore the homeowners had no "balance due" to IBIS when they received the notice of liens.
The court erroneously found that at the time of the lien filings, the balance due to IBIS was approximately $67,000. The court disregarded the homeowners admittedly valid claims against IBIS. In addition, the court misapplied the law to the facts as stipulated by the parties. Requiring the homeowners to pay the mechanics' liens would require them to make a double paymentone in the form of a payment to the subcontractors, and a second in the form of fixing the defective work. In this case the homeowners' exposure is limited to the balance due to IBIS on receipt of the notice of the liens, and because the record establishes that there was no balance due on receipt of the notice of the liens, the lien claims must fail.
The entry is:
Judgment vacated.
Remanded to the Superior Court with direction to enter judgment in favor of the defendants.
All concurring.
NOTES
[1]  On July 5, 1990, a default judgment was entered against IBIS in favor of the subcontractors.
[2]  Section 3255(3) in part provides as follows:

3. Notice to owner. If the labor, materials or services were not performed or furnished by a contract with the owner of the property affected, the lien described in this chapter may only be enforced against the property affected to the extent of the balance due to the person with whom the owner has directly contracted to perform or furnish the labor, materials and services on which the lien claim is based. The defense established by this subsection shall only be available with respect to sums paid by the owner to the person with whom the owner has directly contracted where payment was made prior to commencement of an action to enforce such lien by the person performing or furnishing labor, materials or services without a contract with the owner....
In no case shall the total amount due from the owner to those performing or furnishing labor, materials or services without a contract with the owner exceed the balance due from the owner to the person with whom he has directly contracted at the time of service of process on the owner in a lien action or receipt of written notice ... whichever occurs first.
[3]  In 1976 the Legislature amended section 3255 to provide more protection for homeowners. The statement of fact accompanying the amendment states:

The purpose of this bill is to provide better protection for owners and bona fide purchasers of real property from unrecorded mechanics' liens and from the possibility of having to make double payment to contractors and subcontractors.
P.L.1975, c. 734, effective July 29, 1976. The amendment provided for greater homeowner protection by preventing them from paying more than the value of the materials and services they received.
[4]  Stipulations # 33 and 34 provide

33. IBIS substantially completed its work on or about October 1, 1987 subject to claims of the owners for poor workmanship and breach of contract. If IBIS had completed its work in accordance with its agreement as amended, there would have been at least $52,628.96 but no more than $67,460.32 due to IBIS at the completion of the work.
34. Due to poor workmanship, failure to follow the plans and specifications and failure to complete to [sic] work by the date agreed, the Owners have valid claims against IBIS which exceed by more than $20,000.00 any amounts otherwise due by Owners To IBIS.
