
652 P.2d 249 (1982)
98 N.M. 699
USLIFE TITLE INSURANCE COMPANY OF DALLAS, Plaintiff-Appellant,
v.
Robert A. ROMERO, et al., Defendants-Appellees'
Bela Candelaria, et al., Defendants.
No. 5326.
Court of Appeals of New Mexico.
April 6, 1982.
Rehearing Denied April 20, 1982.
Certiorari Denied June 18, 1982.
Certiorari Quashed October 20, 1982.
*250 Harry O. Morris, Albuquerque, for plaintiff-appellant.
R. Thomas Dawe, Houston, Housman, Freeman & Dawe, P.A., Albuquerque, for defendants-appellees Robert A. Romero, Margaret D. Romero, James D. Romero and L. Norene Romero.
Judith L. Zabel, Albuquerque, for defendant-appellee Candelaria.
Robert H. Clark, Keleher & McLeod, P.S., Albuquerque, for defendant-appellee USF&G.
David F. Boyd, Jr., Albuquerque, for defendant-appellee Chevron Oil.
Sarah Bennett, Sp. Asst. Atty. Gen., Santa Fe, for defendant-appellee Bureau of Revenue.
Office of the U.S. Atty., Albuquerque, for defendant-appellee IRS.
Certiorari Denied June 18, 1982 (Romero).
Certiorari Quashed October 20, 1982 (USLife).

OPINION
NEAL, Judge.
This case presents two issues:
1. Whether, under the circumstances of this case, the trial court correctly determined that USLife Title was not entitled to be subrogated to Internal Revenue Service tax lien No. 38459.
2. Whether Robert and Margaret Romero, and James and Norene Romero, were properly allowed to claim, prior to foreclosure, $10,000 homestead exemptions pursuant to § 42-10-9, N.M.S.A. 1978.
We affirm the trial court on the subrogation issue. We reverse the trial court on the homestead exemption issue, finding that the two Romero couples were not entitled to homestead exemptions, and remand for a new disposition of foreclosure proceeds consistent with this finding.
Three brothers, Robert Romero, James Romero and Sam Candelaria had a partnership doing business as Sierra Electric (Sierra). In 1975, the Internal Revenue Service recorded lien No. 38459 against Sierra and the three brothers for outstanding 1973 taxes. The IRS had also recorded another lien against Sierra and the brothers for outstanding 1974 taxes, but it released Robert Romero from that lien.
In 1976, Albuquerque Federal Savings and Loan Association (Albuquerque Federal) took a mortgage on Robert Romero's house. USLife Title Insurance Company (Title) issued a policy of title insurance on this property to Albuquerque Federal, without excepting the IRS lien for 1973 taxes (No. 38459) from its coverage.
In May, 1977, United States Fidelity and Guaranty Company (USF&G) recorded two transcribed judgments against Sierra and the brothers. In November, 1977, Chevron Oil recorded a transcribed judgment against Sierra and the brothers. In May, 1978, New Mexico tax liens were recorded against Sierra and the brothers.
In September, 1978, IRS gave notice of a foreclosure sale of Robert Romero's property in order to collect the 1973 tax lien. Albuquerque Federal demanded that Title pay the lien pursuant to the terms of the title insurance policy in order to protect Albuquerque Federal's mortgage. On October 5, 1978, Title paid the lien for $11,284.07.
After paying the lien, Title recorded a claim of subrogation to the rights of the IRS tax lien. Title sent a letter to the three brothers demanding reimbursement for the payment of the lien. Then, in November, 1978, Title filed this suit to foreclose on Robert Romero's house and on James Romero's house to collect the money it had paid IRS.
Title joined as defendants the three brothers, their wives, and various creditors of Sierra and the brothers. Eventually, the parties boiled down to Title as plaintiff and the three brothers, two wives, the IRS, USF&G, Chevron Oil, and the New Mexico Bureau of Revenue as defendants. Defendants Bell Federal Credit Union, Joe Rue, Pacific Finance Corporation, Employment Security Commission of the State of New Mexico, and Clark Truck Equipment Company were determined to have no interest in this action.
*251 USF&G and the New Mexico Bureau of Revenue cross-claimed against the remaining defendants to foreclose on their outstanding judgments. In none of the answers to either the original complaint or the cross-complaints did the three brothers and wives claim a homestead exemption.
The brothers and wives counterclaimed against Title for damages resulting from Title's actions, alleging malicious prosecution, abuse of process and breach of contract. These counterclaims were disposed of as being untimely filed and do not concern us here.
The final judgment and decree of foreclosure provided for disposition as follows:
James D. Romero and L. Norene Romero property:
1. Costs of sale and Special Master's fee.
2. IRS, $9,890.06, plus interest and penalties.
3. USF&G, $20,726.81.
4. New Mexico Bureau of Revenue, $5,238.60, plus interest and penalties.
5. The balance, if any, to be paid into the Registry of the Court for disbursement as directed.
Robert A. Romero and Margaret D. Romero property:
1. Costs of sale and Special Master's fee.
2. USF&G, $20,726.81.
3. Chevron Oil, $4,039.84.
4. New Mexico Bureau of Revenue, $5,238.60.
5. USLife Title, $11,284.07.
6. The balance, if any, to be paid into the Registry of the Court for disbursement as directed.
The court entered a conclusion of law which provides that Mr. and Mrs. James Romero, and Mr. and Mrs. Robert Romero, pursuant to § 42-10-9, N.M.S.A. 1978, prior to foreclosure, be permitted to claim $10,000 homestead exemptions in their respective dwellings. The trial court also entered a conclusion of law that plaintiff USLife Title was not subrogated to the IRS by reason of the payment of $11,284.07. Plaintiff Title appeals claiming that it should have been subrogated to the IRS, and that the trial court erred in allowing the Romero couples' homestead exemptions.
I. The trial court correctly determined that Title was not entitled to subrogation to the IRS on federal tax lien No. 38459.
The IRS recorded federal tax lien No. 38459 on June 18, 1975. On July 2, 1976, Title issued a policy to Albuquerque Federal insuring fee simple title to a piece of property owned by Robert and Margaret Romero. On the same day, Albuquerque Federal recorded its mortgage on the same piece of property for a loan to the Romeros of $22,400.
Title did not exempt federal tax lien No. 38459 from its coverage, even though the lien had been recorded since June 18, 1975. Title was aware of the lien but somehow thought that the Robert Romero in the lien was not the same Robert Romero who currently owned the property.
The language of the policy gave Title the right to subrogate to Albuquerque Federal on any claims that it paid under the policy. On September 14, 1978, IRS gave notice that the Romero property had been seized for nonpayment of federal taxes and that the property would be sold on October 6, 1978. Albuquerque Federal demanded that Title pay the tax lien in order to protect its mortgage. On October 5, 1978, Title paid IRS $11,284.07, the amount then owing on federal tax lien No. 38459. On the same day, Title recorded its notice of claim of subrogation for the IRS lien.
Title based its claim for subrogation on this reasoning: Albuquerque Federal would have had the right to subrogate to the IRS on a claim against the Romeros due to breach of the Romero's warranties of title to Albuquerque Federal. Albuquerque Federal's right arose because the Romeros neglected to inform Albuquerque Federal of the outstanding IRS lien on their property, and the mortgage contains the statement that "Borrower convenants * * * that *252 the property is unencumbered, and that Borrower will warrant and defend generally the title to the property against all claims and demands, subject to any declarations, easements or restrictions listed in a schedule of exceptions to coverage in any title insurance policy insuring Lender's interest in the Property." Then, under the subrogation provisions of the title insurance policy to Albuquerque Federal, Title acquired by subrogation the bank's claim against the Romeros.
There is a rather large body of case law that allows a mortgagee to subrogate to the rights of tax liens paid by the mortgagee to protect its mortgage. See Annot., 61 A.L.R. 587, 601-607 (1929); Annot., 106 A.L.R. 1212, 1217-1224 (1937); 73 Am.Jur.2d Subrogation § 66, § 122 (1974), and cases cited therein. In addition to case law supporting this proposition, Internal Revenue Code, 26 U.S.C. § 6323(i)(2) (1976) states:
Where, under local law, one person is subrogated to the rights of another with respect to a lien or interest, such person shall be subrogated to such rights for purposes of any lien imposed by section 6321 or 6324.
Internal Revenue Code, 26 U.S.C. § 6321 (1976) states:
If any person liable to pay any tax neglects or refuses to pay the same after demand, the amount (including any interest, additional amount, addition to tax, or assessable penalty, together with any costs that may accrue in addition thereto) shall be a lien in favor of the United States upon all property and rights to property, whether real or personal, belonging to such person.
Under these statutes, subrogation to rights of federal tax liens is allowed if state law allows it.
In Fidelity & Deposit Co. of Maryland v. Atherton, 47 N.M. 443, 144 P.2d 157 (1943), the New Mexico Supreme Court held that a bonding company's negligence in failing to collect on a note from the bondee of the debt precludes its right to subrogation to the bondee's claim against a potentially liable party. Fidelity suggests that the New Mexico Supreme Court considers negligence by the payor as a bar to subrogation.
In the present case, the trial court found that Title was negligent in failing to exclude IRS lien No. 38459 from coverage under the insurance policy with Albuquerque Federal. It is under the subrogation provisions of this title insurance policy that Title claims its entitlement to subrogation to the IRS. We find that there is ample evidence to support the trial court's finding of negligence, and hold that, under the circumstances of this case, Title's negligence precludes it from being subrogated to the IRS.
USLife Title Insurance of Albuquerque is the local agent of USLife Title Insurance Company of Dallas, plaintiff-appellant in this case. An agent of USLife Title Insurance of Albuquerque performed a title search in preparation of the title insurance policy for Albuquerque Federal concerning land owned by Robert Romero. The agent became aware that several tax liens had been filed of record against a Robert Romero who was or had been connected with Sierra Electric Company. The agent checked the Albuquerque City Directory and found that Robert Romero was a policeman. The agent then called Albuquerque Federal and found that they too had Robert Romero listed as a policeman. The agent, aware that Robert Romero was a common name, assumed that the Robert Romero tax liens were recorded against another Robert Romero. The agent made no further inquiry. The agent did not check Robert Romero's social security number against the social security number on the federal tax lien. The agent did not ask Robert Romero if he was ever associated with Sierra Electric, nor did he check with the Albuquerque Police Department to inquire of his occupational history. Albuquerque Federal had on file a credit bureau report which indicated that Robert Romero had at one time been associated with Sierra Electric, yet the agent did not obtain this information. Had the agent conducted a more thorough investigation he would have *253 determined that the federal tax lien was recorded against the Robert Romero property he was insuring.
In holding that negligence by Title bars subrogation we find support from other jurisdictions. In Coy v. Raabe, 69 Wash.2d 346, 418 P.2d 728 (1966), there were IRS tax liens on a piece of property. The IRS levied upon the property, took possession, and worked out an agreement with prospective purchasers whereby $31,157.87 of the purchase price of $50,000 would be used to pay off the federal tax liens. A bank lent the purchasers $25,000 of the purchase price for a mortgage on the property. The purchasers paid off the IRS tax liens for $31,157.87.
The title company insured fee simple title in purchasers subject to a mortgage; the title company, in a different policy to the bank, insured the bank's mortgage. The title company did not discover a pre-existing lease on the property with an option to buy.
The lessee exercised the option to buy. The court granted specific performance to the lessee. Apparently, the title company had to pay $8,000 under its policy to the purchasers and $25,000 under its policy to the mortgagee bank, thereby acquiring the mortgage.
Both the purchasers and the title company sought subrogation to the IRS tax liens, which they had paid, against the lessee, who was getting the property free of those liens. The court allowed the purchasers to subrogate, because the title company was negligent in failing to discover the outstanding lease.
It would be a gross misapplication of the doctrine of subrogation were we to hold that its cloak settles automatically upon one who has simply made a mistake, when it is a commercial transaction involving a consideration. Intervenor's [title company's] relationship is governed by the law of contracts. Further, it is difficult to think of a situation in which a title insurance company could not claim unjust enrichment as to someone who might inadvertently benefit by their negligence. Either they insure or they don't. It is not the province of the court to relieve a title insurance company of its contractual obligation. 418 P.2d at 731.
Also, in Lawyers Title Ins. Co. v. Capp, 174 Ind. App. 633, 369 N.E.2d 672 (1977) a title company insured title on a piece of property, but failed to exempt from coverage a strip of land which had previously been sold. The title company had excepted the strip in its original commitment, but failed to except it in an amended commitment. The purchaser paid for the entire piece of property. The title company reimbursed the purchaser for the purchase price of that strip, and then attempted to subrogate the purchaser's claim against the seller. The court denied subrogation, pointing out that the title company made the mistake.
We hold that, under the circumstances of this case, Title's negligence is a bar to subrogation.

II. Homestead exemption.
The trial court permitted both Romero couples to claim a $10,000 homestead exemption in their respective dwellings pursuant to § 42-10-9, N.M.S.A. 1978. The homestead exemption statute was amended, § 42-10-9 (Cum.Supp. 1980), however, under Art. IV, § 34 of the New Mexico Constitution the amended statute does not apply. N.M. Const. Art. IV, § 34 provides:
No act of the legislature shall affect the right or remedy of either party, or change the rules of evidence or procedure, in any pending case.
Because this case was pending when the amended statute was enacted the old statute, § 42-10-9, N.M.S.A. 1978, applies to this case. See Stockard v. Hamilton, 25 N.M. 240, 180 P. 294 (1919).
When the old statute was in effect, § 39-4-15, N.M.S.A. 1978, required that "[t]he defendant, if he desires to claim such real estate or any part thereof as an exemption allowed by law, shall set up his claim of exemption by answer in such foreclosure suit." To be entitled to a homestead exemption, *254 a party had to claim the exemption in his answer to a foreclosure action; otherwise, he could not claim it. Speckner v. Riebold, 86 N.M. 275, 523 P.2d 10 (1974). The Romero couples did not claim homestead exemptions, either in their answers to the original complaint by Title seeking foreclosure, or in their answers to the crossclaims of the New Mexico Bureau of Revenue and USF&G seeking foreclosure on their judgments. Because they did not claim the homestead exemption in their answers, the Romero couples are not entitled to the homestead exemptions granted by the trial court.
Title had raised several minor issues which do not affect the major issues; we find these to be without merit.
We remand this case to the district court to amend the final judgment and disposition of the foreclosure proceeds consistent with this opinion.
IT IS SO ORDERED.
SUTIN and LOPEZ, JJ., concur.
