Plaintiffs-Appellants Nasim and Tej Iqbal appeal the dismissal of numerous claims relating to foreclosure on their home. For the reasons herein, we affirm the district court’s dismissal.
I.
The Iqbals purchased the property at issue in this case on May 12, 2006 and eventually defaulted. Bank of America sought to foreclose on the property in 2011.
The Iqbals filed suit to prevent the foreclosure in state court. That case was removed to federal court and later dismissed without prejudice. The court allowed the Iqbals thirty days to file an amended complaint, which the Iqbals did not do.
In August 2012, the property was sold to Fannie Mae at a foreclosure sale. On August 22, 2012, Fannie Mae filed an Original Petition for Forcible Detainer seeking possession of the property (“the FED proceeding”) and, in support of its claim, attached a copy of the Substitute Trustee’s Deed. On September 18, 2012, the FED proceeding was abated at the request of the Iqbals. The court explained that it abated the proceeding because the Iqbals “raised issues of title” and it “lack[ed] the jurisdiction to grant the relief sought by [Fannie Mae].” That same day, the Iqbals filed this suit in state court, alleging claims based on quiet title, statutory fraud, breach of contract, negligence, and declaratory judgment. The case was subsequently removed to federal court on the basis of diversity jurisdiction.
The Iqbals then filed a motion to remand, claiming Appellee Barrett Daffin Frappier Turner & Engel (“BDFTE”), a law firm that had represented Bank of America, N.A. (“BANA”) in the foreclosure, was non-diverse. The district court denied the motion, finding that the Iqbals had failed to state a viable cause of action against BDFTE and that BDFTE was improperly joined for the purposes of defeating diversity. It allowed the Iqbals to amend their complaint in order to state a claim against BDFTE. Thereafter, BDFTE and other Defendants-Appellees filed motions to dismiss under Federal Rule of Civil Procedure (“FRCP”) 12(b)(6).
The district court granted BDFTE’s motion to dismiss by incorporating its denial of the motion to remand, which explained that BDFTE enjoyed attorney immunity. It also dismissed the claims against the remaining defendants, articulating a num*365ber of grounds for dismissal including that the correction of the mistake in the deed removed any basis for relief.
On appeal, the Iqbals challenge the district court’s denial of their motion to remand and dismissal of their claims, and argue that this court and the district court lack jurisdiction over their case.
II.
We review de novo a dismissal for failure to state a claim under FRCP 12(b)(6). Highland Capital Mgmt. LP v. Bank of Am., Nat’l Ass’n, 698 F.3d 202, 205 (5th Cir.2012) (per curiam).
The Iqbals’ claims of quiet title, statutory fraud, breach of contract, and negligence rest on an error in the description of the property in the original Deed of Trust and later copied into the Substitute Trustee’s Deed recorded after the foreclosure sale. The property’s legal description is as follows:
LOT 12, BLOCK C, SILVERADO WEST PHASE A, SECTION 2, A SUBDIVISION IN WILLIAMSON COUNTY, ACCORDING TO THE PLAT RECORDED IN CABINET AA, SLIDES 249, PLAT RECORDS WILLIAMSON COUNTY, TEXAS.
When the Iqbals executed a Deed of Trust upon purchasing the property, it described the property using the phrase “Section 1” rather than “Section 2.” On September 22, 2006, this error was corrected by the filing of an Affidavit of Fact. In 2009, when the Deed of Trust was assigned to Bank of America, the assignment again described the property using “Section 1” rather than “Section 2.” In August 2012, after the property was sold to Fannie Mae at a foreclosure sale, the Substitute Trustee’s Deed identified the property using “Section 1” rather than “Section 2.” On November 26, 2012, a Corrected Substitute Trustee’s Deed was filed, correcting the description to read “Section 2.”
The Iqbals argue these corrected documents demonstrate that Defendants foreclosed on the wrong property. They also maintain that the correction deed was improper because a correction deed may not be used to convey an additional, separate parcel of land. Here, however, the correction deed simply corrected a scrivener’s error. We agree with the district court that because all the Iqbals’ claims were premised on the mistake in the original Substitute Trustee’s Deed, the correction of the mistake removes any basis for relief.
The Iqbals next argue that the district court improperly denied their motion to remand. We review denials of motions to remand de novo. Luckett v. Delta Airlines, Inc., 171 F.3d 295, 298 (5th Cir.1999). In determining whether a party has been improperly joined, the district court should conduct “a Rule 12(b)(6)-type analysis,” which the district court here did. See McDonal v. Abbott Labs., 408 F.3d 177, 183 n. 6 (5th Cir.2005).
The Iqbals argue that the district court erred in finding that BDFTE was improperly joined. Specifically, they contend their claims against BDFTE were viable because BDFTE did not qualify for attorney immunity. We disagree. BDFTE was retained to assist in the foreclosure, and the actions complained of by the Iqbals are within the scope of their representation. The Iqbals argue that attorney immunity applies only in the litigation context, but that stance is not in line with Texas law.1 See, e.g., Campbell v. *366Mortg. Elec. Registration Sys., Inc., No. 03-11-00429-CV, 2012 WL 1839357, at *5-6 (Tex.App.-Austin, May 18, 2012, pet.denied) (affirming dismissal on grounds of attorney immunity in wrongful foreclosure case against attorneys retained by Wells Fargo to assist in foreclosure).2
The Iqbals lastly argue that the district court should have remanded for lack of jurisdiction based on the prior exclusive jurisdiction doctrine. They assert that the district court erred in concluding the doctrine did not apply in this case. They base their argument on the existence of the prior FED proceeding in state court.
Under the doctrine of prior exclusive jurisdiction, “when one court is exercising in rem jurisdiction over a res, a second court will not assume in rem jurisdiction over the same res.” Marshall v. Marshall, 547 U.S. 293, 311, 126 S.Ct. 1735, 164 L.Ed.2d 480 (2006). As the district court explained, the primary purpose of this doctrine is to prevent jurisdictional disputes brought about as a result of multiple concurrent proceedings. See Kline v. Burke Constr. Co., 260 U.S. 226, 229, 43 S.Ct. 79, 67 L.Ed. 226 (1922). Here, the FED proceeding was abated and the court in that proceeding specifically declined to exercise jurisdiction. Thus, the district court properly found that the prior exclusive jurisdiction doctrine did not apply.
III.
Accordingly, we AFFIRM the district court’s dismissal of the Iqbals’ claims, as well as its denial of their motion to remand.