
    UNITED STATES of America, Plaintiff v. ROGERS CARTAGE COMPANY, Defendant-Cross Claim Third/Party Plaintiff-Appellant, v. Monsanto Company, et al., Defendants-Cross Claim Third/Party Defendants-Appellees.
    Nos. 12-3624 & 13-3052.
    United States Court of Appeals, Seventh Circuit.
    Argued Jan. 6, 2014.
    Decided July 27, 2015.
    
      David S. Gualtieri, Attorney, Department of Justice, Washington, DC, J. Christopher Moore, Attorney, Office of the United States Attorney, Fairview Heights, IL, for Plaintiff.
    Ronald J. Eisenberg, Attorney, Robert Schultz, Attorney, Schultz & Associates LLP, Chesterfield, MO, for Defendant Cross Claim Third/Party Plaintiff-Appellant.
    Jane E. Fedder, Attorney, Joseph G. Nassif, Attorney, Husch Blackwell LLP, St. Louis, MO, Bernard J. Ysursa, Sr., Attorney, Cook, Ysursa, Bartholomew, Brauer & Shevlin, Belleville, IL, for Defendants-Cross Claim Third/Party Defendants-Appellees.
    Before EASTERBROOK, WILLIAMS, and TINDER, Circuit Judges.
   TINDER, Circuit Judge.

The villages of Sauget and Cahokia, Illinois, located along the east bank of the Mississippi River just south of East St. Louis, are home to a three-and-a half-mile storm water conveyance channel known as Dead Creek. The name is morbid, but fitting. For more than a century, the area has been dominated by industrial activity, and for much of that time, Dead Creek was the recipient of a broad array of waste materials, including polychlorinated biphe-nyls (“PCBs”). Because of its extensive contamination, the creek became the center of a cleanup site designated by the U.S. Environmental Protection Agency (“EPA”) as Sauget Area 1. In 1999, the government sued several potentially responsible parties (“PRPs”) regarding the cleanup of Sauget Area 1, and many of those PRPs brought contribution claims against one another. One PRP, Rogers Cartage Company, settled with the other PRPs, but later it sought contribution from them again via a third-party complaint in a separate action. After that third-party complaint was severed and transferred back to the EPA action, the district court dismissed it and imposed sanctions against Rogers Cartage based on the settlement agreement. Rogers Cartage appeals those decisions, and we affirm.

I. BACKGROUND

In 1999, the United States filed a complaint under the Comprehensive Environmental Response, Compensation and Liability Act of 1980 (“CERCLA”), seeking to recover costs incurred by the EPA in removing hazardous substances from a site' known as Sauget Area 1, which follows Dead Creek through the Villages of Sauget and Cahokia, Illinois, just south of East St. Louis. Monsanto Company and Solutia, Inc. were among the original defendants in the case. From the early 1900s uiitil 1997, Monsanto operated chemical plants in Sau-get, Illinois, and St. Louis, Missouri. During that time, Monsanto disposed of chemical waste from those plants, including PCBs and other hazardous substances, at waste disposal sites within Sauget Area 1. In 1997, Monsanto spun-off its chemical business to Solutia, and Solutia agreed to indemnify Monsanto against any environmental claims relating to that business.

Monsanto and Solutia filed a third-party complaint bringing several new parties into the action, including Rogers Cartage Company, which formerly operated two trucking depots near (but not within) Sau-get Area 1, one in the Village of Sauget and one in the Village of Cahokia. Monsanto and Solutia sought contribution from Rogers Cartage based on the allegation that Rogers Cartage washed its trucks at these two depots after hauling hazardous substances, releasing those substances into drainage systems that ultimately made their way into Dead Creek, thus contributing to the pollution of Sauget Area 1. The government subsequently amended its complaint to add Rogers Cartage as a defendant, and several other defendants brought cross-claims against Rogers Cartage based on the same theory.

In 2000, Monsanto merged with Phar-macia & Upjohn, Inc., creating the new entity Pharmacia Corporation. In 2001, Pharmacia was substituted for- Monsanto as a party.

In late 2003, the district court held a bench trial to resolve the government’s claims against Rogers Cartage. Ultimately, the court found that the government had not established by a preponderance of the evidence that the discharges from Rogers Cartage’s trucking depots ever made their way into Dead Creek. Therefore, the court ruled in favor of Rogers Cartage.

After the bench trial, Rogers Cartage moved to dismiss the contribution claims brought against it by Pharmacia, Solutia, and other defendants. The district court granted that motion, reasoning that those claims failed as a matter of law because Rogers Cartage had been found not liable on the claim brought by the government under CERCLA § 107, 42 U.S.C. § 9607. At that point, all claims by or against Rogers Cartage were dismissed with prejudice.

In June 2007, the Supreme Court decided United States v. Atlantic Research Corp., 551 U.S. 128, 127 S.Ct. 2331, 168 L.Ed.2d 28 (2007), marking a change in the law and establishing that potentially responsible parties that incur voluntary cleanup costs may seek contribution from other potentially responsible parties under CERCLA § 107. In light of this decision, Pharmacia and Solutia sought leave to file an amended cross-claim against Rogers Cartage, arguing that their contribution claims were no longer derivative of the government’s claims against Rogers Cartage. The district court granted the motion, and an amended cross-claim was filed bringing Rogers Cartage back into the case. Subsequently, two other defendants, Cerro Copper Products Co. (now Cerro Flow Products, Inc.) and Exxon Mobil Oil Corporation, were also permitted to file amended cross-claims against Rogers Cartage based on Atlantic Research.

Rogers Cartage subsequently filed counterclaims against Pharmacia, Solutia, Cer-ro, and Exxon Mobil, seeking contribution from those companies .based on their releases of hazardous substances in Sauget Area 1. In the counterclaim against Phar-macia and Solutia, Rogers Cartage alleged that Monsanto Company had arranged for the transport and disposal of hazardous substances by Rogers Cartage without informing Rogers Cartage of the nature of the substances involved.

In February 2011, Pharmacia, Solutia, Cerro, and Exxon Mobil settled their claims against Rogers Cartage for $7,500,000. However, the settlement agreement provided that Rogers Cartage would be required to pay only $50,000 of that amount itself, so long as it cooperated in the effort to recover the difference from its insurance carrier, Travelers. The agreement also provided that Pharmacia, Solutia, Cerro, and Exxon Mobil would fund any coverage dispute with Travelers.

The settlement agreement further provided for the release of all claims between the parties “pertaining to the Sauget Area 1 and 2 Sites,” including any claims “brought or alleged, or which could have been brought or alleged” in the EPA action. The agreement defined the “Sauget Area 1 Sites” to include “the geographic area so named and identified by the United States Environmental Protection Agency (‘U.S. EPA’),” and “any portion of any property constituting a drainage pathway, to the extent it is contaminated by such drainage, to or from Dead Creek.” The agreement also contemplated that cleanup of Rogers Cartage’s Cahokia depot would be paid for out of the settlement proceeds. Specifically, it provided that a portion of any insurance récovery above $3 million would be placed in a trust account which Rogers Cartage could use to pay for, inter alia, “any claims against Rogers regarding contamination at the Cahokia facility alleged to have been operated by Rogers.”

Rogers Cartage leased the land where its Cahokia depot was located from Cono-coPhillips Pipe Line Company, which is now Phillips 66 Pipeline LLC. In June 2011, Phillips 66 (then ConocoPhillips) filed a separate action against Rogers Cartage, seeking contribution for the costs it incurred in voluntarily cleaning up its Cahokia property. In May 2012, Rogers Cartage filed a third-party complaint against Pharmacia, Solutia, and an entity it called “Old Monsanto,” apparently referring to the former Monsanto Company that no longer exists. In its third-party complaint, Rogers Cartage again alleged that Monsanto arranged for the disposal of hazardous substances at the Cahokia property.

Monsanto, Solutia, and Pharmacia (collectively, “MS & P”) moved to dismiss Rogers Cartage’s third-party complaint in the Phillips action on the grounds that it was barred by the settlement agreement in the EPA action and otherwise failed to state a claim upon which relief could be granted. In the alternative, MS & P moved to sever the third-party complaint and transfer it to the EPA action so that it could be considered by the judge who had previously approved the settlement agreement. The motion was granted to the extent that it requested severance and transfer, and the EPA action was reopened for that purpose.

In the EPA action, MS & P moved to enforce the settlement agreement and dismiss Rogers Cartage’s recently transferred third-party complaint. At a hearing on October 15, 2012, the district court orally granted that motion, finding that the settlement agreement unambiguously encompassed claims for cleanup of the Cahokia property. At the end of the hearing, the court asked MS & P’s counsel to quickly move for attorney’s fees if he intended to do so.

On October 19, 2012, Solutia moved for sanctions against Rogers Cartage, its attorney (Robert Schultz), and Travelers under 28 U.S.C. § 1927, Federal Rule of Civil Procedure 11, and the court’s inherent power, seeking $200,000 in attorney’s fees. Among other things, Solutia argued that Rogers Cartage’s third-party complaint was frivolous because it was plainly barred by the settlement agreement.

On November 14, 2012, the district court granted Solutia’s motion for sanctions, reasoning simply that Rogers Cartage “filed a complaint in the face of an unambiguous settlement agreement.” The court ordered Rogers Cartage to pay Solutia $200,000 in fees, but it did not impose any sanctions on Mr. Schultz or Travelers. In doing so, the court purported to rely on all three of the bases suggested by Solutia: § 1927, Rule 11, and the court’s inherent power.

Rogers Cartage has filed two notices of appeal. The first appeal must be dismissed as premature, but the second presents all issues for resolution. In the second notice of appeal, Rogers Cartage challenges both the district court’s dismissal of its third-party complaint and the district court’s sanctions order.

II. DISMISSAL

MS & P moved to dismiss Rogers Cartage’s third-party complaint under Federal Rule of Civil Procedure 12(b)(6), arguing that it was barred by the settlement agreement. On appeal, Rogers Cartage first argues that the district court committed procedural error in granting the motion because it was based on an affirmative defense and relied on facts not alleged in the third-party complaint, namely, the content of the settlement agreement. Rogers contends that the district court should have converted the motion into a motion for summary judgment and given Rogers an opportunity to present evidence in response.

Although MS & P moved for dismissal under Rule 12(b)(6), the problem it identified with the third-party complaint was not that Rogers failed to state a claim; “the problem [was] that [Rogers] signed a release waiving the right to make a claim.” Yassan v. J.P. Morgan Chase & Co., 708 F.3d 963, 975 (7th Cir.2013). Because the release of a claim is an affirmative defense, MS & P should have raised it and then moved for judgment on the pleadings under Rule 12(c). See Carr v. Tillery, 591 F.3d 909, 913 (7th Cir.2010). “Though district courts have granted Rule 12(b)(6) motions on the basis of affirmative defenses and this court has affirmed those dismissals, we have repeatedly cautioned that the proper heading for such motions is Rule 12(c), since an affirmative defense is-external to the complaint.” Brownmark Films, LLC v. Comedy Partners, 682 F.3d 687, 690 n. 1 (7th Cir.2012). However, we have found such procedural missteps harmless when all the facts necessary to rule on the affirmative defense are properly before the court on the motion to dismiss. See Yassan, 708 F.3d at 975; Brownmark Films, 682 F.3d at 690; Carr, 591 F.3d at 913.

Rogers Cartage argues that the settlement agreement should not have been considered by the district court without converting MS & P’s motion into a motion for summary judgment and giving Rogers notice and an opportunity to present evidence in response to the motion. In general, if “matters outside the pleadings are presented to and not excluded by the court, the motion must be treated as one for summary judgment under Rule 56. All parties must be given a reasonable opportunity to present all the material that is pertinent to the motion.” Fed.R.Civ.P. 12(d). However, “the failure to afford such procedure will not necessarily mandate reversal unless ‘the record discloses the existence of unresolved material fact issues,’ or ‘the parties represent that they would have submitted specific controverted material factual issues to the trial court if they had been given the opportunity.’ ” Woods v. City of Chicago, 234 F.3d 979, 991 (7th Cir.2000) (quoting Milwaukee Typographical Union No. 23 v. Newspapers, Inc., 639 F.2d 386, 391 (7th Cir.1981)).

Here, the language of the settlement agreement and Rogers Cartage’s third-party complaint is undisputed, and Rogers has not identified any evidence (other than that which it actually presented at the hearing on the motion to dismiss) that would have had any bearing on the motion. Indeed, as discussed below, the settlement agreement is unambiguous and therefore no external evidence was necessary to determine whether it barred Rogers Cartage’s third-party complaint. As a result, we find no reversible procedural error in the district court’s dismissal of that complaint.

Turning to the substantive issues relating to that dismissal, we first note that “[w]e review an order enforcing a settlement only for an abuse of discretion.” Newkirk v. Vill. of Steger, 536 F.3d 771, 773 (7th Cir.2008). “A settlement agreement is a particular kind of contract, and so contract law (here, the law of Illinois) governs.” Id. at 774. Rogers Cartage argues that the settlement agreement was intended to cover only the cleanup of Sau-get Area 1 and Sauget Area 2, relying on the fact that the release provisions do not mention the Cahokia facility. However, “[a] contract must be construed as a whole, viewing each provision in light of the other provisions.” Thompson v. Gordon, 241 Ill.2d 428, 349 Ill.Dec. 936, 948 N.E.2d 39, 47 (2011). Here, the settlement agreement provided for the release of all claims between the parties “pertaining to the Sauget Area 1 and 2 Sites,” and it defined the “Sauget Area 1 Sites” to include “any portion of any property constituting a drainage pathway, to the extent it is contaminated by such drainage, to or from Dead Creek.”

Rogers Cartage maintains that its Cahokia depot was not a drainage pathway to Dead Creek, and it argues that in order to determine otherwise, the district court would have had to consider evidence that cannot be considered on a motion to dismiss. This argument misses the point. The theory of liability underlying MS & P’s contribution claims against Rogers Cartage in the EPA action was that contaminants released at Rogers Cartage’s two trucking depots drained into Dead Creek and therefore contributed to the contamination in Sauget Area 1. Whether that theory is true is irrelevant. The parties settled any claims they may have had against each other, assuming that it was true. Therefore, under the settlement agreement, Rogers Cartage’s Cahokia depot is considered a drainage pathway to Dead Creek, and it is included in the definition of the “Sauget Area 1 Sites.”

Moreover, the agreement provided that a portion of any insurance recovery above $3 million would be placed in a trust account which Rogers Cartage could use to pay for, inter alia, “any claims against Rogers regarding contamination at the Cahokia facility alleged to have been operated by Rogers.” This provision would have little import if Rogers could still sue MS & P for the cleanup of its Cahokia depot, and contracts should not be construed “in a manner that would nullify or render provisions meaningless.” Thompson, 349 Ill.Dec. 936, 948 N.E.2d at 47.

Rogers Cartage contends that releases are to be construed narrowly under Illinois law, but rules of construction come into play only when a contract is ambiguous. Maddux v. Blagojevich, 233 Ill.2d 508, 331 Ill.Dec. 749, 911 N.E.2d 979, 988 (2009). Rogers also relies on deposition testimony from MS & P’s lawyer suggesting that the settlement agreement was not intended to encompass the cleanup of the Cahokia facility. However, a court can consider extrinsic evidence to determine the parties’ intent only when a contract is ambiguous. See Thompson, 349 Ill.Dec. 936, 948 N.E.2d at 47. “If the words in the contract are clear and unambiguous, they must be given their plain, ordinary and popular meaning.” Id. That is precisely what the district court did in enforcing the settlement agreement. Therefore, we affirm the dismissal of Rogers Cartage’s third-party complaint.

III. SANCTIONS

The district court granted Solu-tia’s motion for sanctions and ordered Rogers Cartage to pay $200,000 in attorney’s fees based on its finding that Rogers “filed a complaint in the face of an unambiguous settlement agreement.” In doing so, the court purported to rely on all three of the bases suggested by Solutia: 28 U.S.C. § 1927, Federal Rule of Civil Procedure 11, and the court’s inherent power. Under any of these authorities, we review the district court’s sanctions order for abuse of discretion. Lightspeed Media Corp. v. Smith, 761 F.3d 699, 708 (7th Cir.2014) (§ 1927); Tucker v. Williams, 682 F.3d 654, 661 (7th Cir.2012) (inherent power); Golden v. Helen Sigman & Assocs., Ltd., 611 F.3d 356, 363 (7th Cir.2010) (Rule 11).

To the extent the court relied on § 1927 in imposing sanctions against Rogers Cartage, it abused its discretion. That statute provides as follows:

Any attorney or other person admitted to conduct cases in any court of the United States or any Territory thereof who so multiplies the proceedings in any case unreasonably and vexatiously may be required by the court to satisfy personally the excess costs, expenses, and attorneys’ fees reasonably incurred because of such conduct.

28 U.S.C. § 1927. Under the statute, sanctions may be levied against an attorney who files a claim that is “without a plausible legal or factual basis and lacking in justification.” Lightspeed, 761 F.3d at 708 (quoting Walter v. Fiorenzo, 840 F.2d 427, 433 (7th Cir.1988)) (internal quotation mark omitted). But as MS & P concedes, § 1927 cannot be used to impose sanctions against a party.

MS & P argues that we should remedy the district court’s mistake by finding “that the sanction applies to both Rogers and its counsel, and that the division of payment should be left to them.” However, the district court’s order is not susceptible to such an interpretation. See Memorandum and Order at 3, United States v. Rogers Cartage, No. 3:99-cv-63-GPM (S.D.Ill. Aug. 21, 2013), ECF No. 907 (“Rogers Cartage is ORDERED to pay-attorney fees and costs to Solutia, Inc. in the amount of $200,000.”). Therefore, we cannot affirm the district court’s sanctions order based on § 1927.

The district court also abused its discretion to the extent it relied on its inherent power in sanctioning Rogers Cartage. It is true that “the inherent power of a court can be invoked even if procedural rules exist which sanction the same conduct.” Chambers v. NASCO, Inc., 501 U.S. 32, 49, 111 S.Ct. 2123, 115 L.Ed.2d 27 (1991). But “when there is bad-faith conduct in the course of litigation that could be adequately sanctioned under the Rules, the court ordinarily should rely on the Rules rather than the inherent power.” Id. at 50, 111 S.Ct. 2123. And when the court chooses to exercise its inherent power, it should explain “why Rule 11 was inadequate to serve [its] purposes.” Corley v. Rosewood Care Ctr., Inc., 142 F.3d 1041, 1059 (7th Cir.1998). In this case, the district court did not explain why exercising the inherent power was necessary. Indeed, it purported to rely on both § 1927 and Rule 11 in addition to the inherent power. And as we will explain, Rule 11 was adequate for the court’s purposes. Therefore, we cannot affirm the court’s sanctions order based on the inherent power.

The filing of a complaint that is precluded by an unambiguous settlement agreement is conduct that fits squarely within the ambit of Rule 11. Rule 11(b) prohibits the filing of frivolous claims, and when a frivolous claim is made, Rule 11(c)(1) gives the court discretion to “impose an appropriate sanction on any attorney, law firm, or party that violated the rule or is responsible for the violation.” As discussed above, we agree with the district court that the settlement agreement unambiguously barred Rogers Cartage’s third-party claims against MS & P. Therefore, we find no abuse of discretion in the court’s conclusion that sanctions were appropriate under Rule 11, and we may affirm the court’s sanctions order on that basis.

Rogers Cartage argues that MS & P failed to abide by Rule ll’s procedural safeguards, and therefore the court erred in imposing sanctions pursuant to that rule. A motion for sanctions under Rule 11 “must be served under Rule 5, but it must not be filed or be presented to the court if the challenged paper, claim, defense, contention, or denial is withdrawn or appropriately corrected within 21 days after service or within another time the court sets.” Fed.R.Civ.P. 11(c)(2). However, we have suggested that strict compliance with this so-called “safe harbor” provision may. be excused where there was substantial compliance, where it was impossible to comply, or where the party against whom sanctions are sought waived compliance. See Methode Elecs., Inc. v. Adam Techs., Inc., 371 F.3d 923, 927 (7th Cir.2004).

We conclude that MS & P substantially complied with Rule ll’s safe-harbor provision in this case. MS & P’s motion to dismiss not only contained arguments that Rogers Cartage’s third-party complaint was frivolous, it also included a request for attorney’s fees. The only plausible basis for an award of attorney’s fees would have been sanctions under one of the authorities discussed above. As a result, Rogers Cartage was on notice that MS & P was requesting sanctions in the form of attorney’s fees, and it had more than a month to withdraw its third-party complaint before the district court ruled on MS & P’s motion to dismiss. In sum, the district court did not commit reversible error in imposing sanctions under Rule 11.

IV. CONCLUSION

The appeal in Case Number 12-3624 is DISMISSED as premature. As to Case Number 13-3052, the district court’s dismissal of Rogers Cartage’s third-party complaint and its order of sanctions against Rogers Cartage are AFFIRMED. 
      
      . We have jurisdiction over "appeals from all final decisions of the district courts of the United States.” 28 U.S.C. § 1291. A final decision is " 'one which ends the litigation on the merits and leaves nothing for .the court to do but execute the judgment.’ ” Riley v. Kennedy, 553 U.S. 406, 419, 128 S.Ct. 1970, 170 L.Ed.2d 837 (2008) (quoting Catlin v. United States, 324 U.S. 229, 233, 65 S.Ct. 631, 89 L.Ed. 911 (1945)). In this case, Rogers Cartage’s first notice of appeal was filed after the district court orally granted MS & P's motion to dismiss, but before the court ruled on Solu-tia’s motion for sanctions. Moreover, the court had indicated that a written order on the motion to dismiss would follow. Thus, at the time Rogers filed its first notice of appeal, the litigation was ongoing, and the district court had more work to do than simply executing the judgment. Because the first appeal was filed prior to a final decision on the merits, we conclude that it must be dismissed for lack of jurisdiction.
     