; and (B) the purchaser of the property shall be entitled to a refund from the seller of all amounts paid pursuant to the covered contract for the period during which the property was not habitable. (c) Relief to seller only available through a judicial proceeding Notwithstanding any other provision of law, the seller in a covered contract may terminate the purchaser’s right to purchase the property that is the subject of the covered contract or right of possession only upon determination by a court of competent jurisdiction that the purchaser is in material breach of the contract. (d) Prohibition on eviction or ejectment (1) In general Except as may be ordered in a judicial proceeding, the purchaser in a covered contract may not be evicted or otherwise ejected from the property that is the subject of the covered contract. (2) Damages (A) In general A purchaser with respect to a covered contract that is terminated through a judicial proceeding may bring a claim or counterclaim to enforce a violation of paragraph (1) in a civil proceeding. (B) Amount If a purchaser described in subparagraph (A) is the prevailing party, the court shall award actual damages and attorney's fees to the purchaser. (e) Recording Not later than 45 days after the date on which a covered contract is signed, the seller in the covered contract shall record the covered contract in the applicable local governmental office that records land records. (f) State laws Nothing in this section shall be construed to annul, alter, or affect any provision of State law if the protection that the provision of State law provides to purchasers in covered contracts is greater than the protection provided to those purchasers under this section. (g) Application This section shall not apply to a covered contract if— (1) the seller in the covered contract is a person described in section 501(c)(3) of the Internal Revenue Code of 1986 for the 3-year period before the date on which the seller enters into the covered contract