484 F.3d 972
KATUN CORPORATION, a Minnesota Corporation, Plaintiff/Appellant,v.Terence Michael CLARKE, a Florida citizen, Defendant/Appellee.
No. 06-2789.
United States Court of Appeals, Eighth Circuit.
Submitted: March 16, 2007.
Filed: May 2, 2007.

John F. Hartmann, argued, Chicago, IL (Joshua Z. Rabinovitz, Daniel C. Moore, Chicago, IL, Stephen P. Safranski, Minneapolis, MN, on the brief), for appellant.
Douglas Ray Peterson, argued, Mankato, MN (James G. Bullard, S. Steven Prince, Minneapolis, MN, on the brief), for appellee.
Before WOLLMAN, JOHN R. GIBSON, and MURPHY, Circuit Judges.
MURPHY, Circuit Judge.


1
Appellant Katun Corporation (Katun) brought this breach of contract action against former shareholder Terence Michael Clarke after he refused to pay his share of a settlement agreement. That agreement had resolved claims asserted by Katun and its parent company PNA Holdings, LLC (PNA) against the previous owners of Katun. One of the settled claims had asserted indemnification for criminal penalties imposed on Katun, and Clarke moved to dismiss this case on grounds of public policy and in pari delicto. The district court granted his motion, and Katun appeals. We reverse.


2
Katun is a Minnesota corporation that supplies replacement parts for photocopiers, facsimile machines, and printers. Clarke cofounded the company in 1978 and served as a director and officer until he was removed from office for financial improprieties in June 2000. Clarke remained Katun's largest shareholder until PNA acquired the company in July 2002.


3
PNA acquired Katun by means of a merger with a wholly owned subsidiary of PNA, leaving Katun as the surviving subsidiary. At the time of the sale Katun and its officers were under investigation by the United States Attorney for possible criminal conduct. Clarke and other selling shareholders of Katun made a number of representations to PNA in the merger agreement about the health of the company. The shareholders represented that Katun had not violated any material applicable laws as of the July 5, 2002 closing date. They also agreed to indemnify PNA and the surviving Katun for losses resulting from a breach of any representation made in the agreement, as well as for losses related to Clarke's financial improprieties. Xerox Corporation, which was also one of the selling shareholders, was appointed as the selling group's agent and attorney in fact to settle any indemnification claims that might arise out of the merger agreement. Clarke himself received more than $68 million as part of the merger transaction.


4
On December 11, 2002, five months after PNA's acquisition of Katun, Clarke pled guilty to four counts of filing false tax returns for failing to report the proceeds of his self dealing at Katun. He cooperated with the government in providing information about additional criminal activity that took place at the company during his tenure, and his cooperation helped lead to guilty pleas by several Katun officers for bribery and computer fraud. Clarke was subsequently charged with aiding and abetting mail fraud for unlawfully gathering competitive intelligence while an officer at Katun, and he again pled guilty in March 2004. These violations were not disclosed to PNA by the selling shareholders prior to its acquisition of Katun.


5
The government also brought charges against the company directly, and on February 6, 2004 Katun pled guilty to a twelve count information dealing with three separate criminal schemes involving computer fraud for unlawful gathering of competitive information, mail fraud arising out of the misappropriation of customer credit balances, and wire fraud. All three criminal schemes were initiated prior to the merger, but two of them continued until March or April of 2003, a number of months after PNA's acquisition of the company. As part of its plea agreement Katun was required to pay more than $11 million in criminal fines, restitution, and forfeiture, and it was placed on probation for two years. Katun also incurred millions of dollars in attorney fees and costs.


6
Citing provisions in the merger agreement, PNA and Katun sought indemnification from the selling shareholders against losses sustained as a result of the sellers' misrepresentations about the company at the time of the sale, including the fines and costs associated with the criminal investigations and the guilty plea of Katun. On behalf of the selling shareholders, Xerox Corporation, acting as their attorney in fact, entered into a settlement agreement with Katun and PNA on June 7, 2005. The settling shareholders agreed to pay PNA "or its designee" $11.65 million in exchange for a release of the indemnification claims. PNA named Katun as its designee to receive the settlement funds.


7
After Clarke refused to pay his portion of the settlement, Katun brought this action for breach of contract, alleging that he owed $1,731,575.99 under the settlement agreement. Katun attached both the settlement and merger agreements to the complaint. Clarke moved to dismiss, arguing that it would violate public policy to permit a company to shift responsibility for its own criminal penalties onto another party and that the action was also barred by the doctrine of in pari delicto. Katun moved for summary judgment to collect under the terms of the settlement agreement. The district court granted Clarke's motion to dismiss on both of the grounds he advanced, concluding that the indemnification provision in the merger agreement was void as against public policy because it permitted Katun to avoid the consequences of its illegal actions. Katun's motion for summary judgment was denied without further discussion.


8
Katun appeals, arguing that the district court erred in dismissing its claim. It contends that the district court mischaracterized the present action as an attempt by Katun to obtain indemnification when in reality Katun seeks to enforce the settlement agreement. That agreement between the parties necessarily resolved any defenses Clarke might have had to the indemnification claims. Even if the settlement agreement had not waived the defenses of public policy and in pari delicto, they would not bar this present action. Katun points out that the indemnification claims were settled not for the benefit of Katun, but for the benefit of PNA, an innocent third party purchaser. PNA was entitled to protect itself by means of the indemnification provision against losses stemming from any illegal conduct occurring prior to the signing of the merger agreement and concealed by the selling shareholders.


9
We review the grant of a motion to dismiss de novo, taking all well pleaded factual allegations as true and drawing all reasonable inferences in favor of the plaintiff. Knieriem v. Group Health Plan, Inc., 434 F.3d 1058, 1060 (8th Cir.2006). When there are documents attached to the complaint, we consider this material along with the allegations in the complaint. See Abels v. Farmers Commodities Corp., 259 F.3d 910, 921 (8th Cir.2001); see also Fed. R.Civ.P. 10(c). We may also take into account matters of public record referenced in the complaint. Deerbrook Pavilion, LLC v. Shalala, 235 F.3d 1100, 1102 (8th Cir.2000). "A motion to dismiss should be granted only if it appears beyond doubt that the plaintiff can prove no set of facts to warrant a grant of relief." Knieriem, 434 F.3d at 1060 (quoting Gilmore v. County of Douglas, Neb., 406 F.3d 935, 937 (8th Cir.2005)).


10
Katun first challenges the district court's conclusion that the indemnification provision violated public policy, arguing that the settlement agreement resolved all defenses that Clarke and other settling shareholders might have had to the claims of PNA and Katun, including a public policy defense. Katun stresses that Minnesota courts recognize a "strong public policy favoring the settlement of disputed claims without litigation." Hentschel v. Smith, 278 Minn. 86, 153 N.W.2d 199, 204 (1967) (citation omitted). Courts generally will not examine the value or validity of a claim or defense where the parties have settled a bona fide dispute in good faith. See De Mars v. Musser-Sauntry Land, Logging & Mfg. Co., 37 Minn. 418, 35 N.W. 1, 1 (1887); see also Libby v. Uptegrove, 988 S.W.2d 131, 133 (Mo.Ct.App.1999) ("by settling, the [defendants] necessarily waived any defenses they might otherwise have had to the underlying claim"). That a plaintiff ultimately would have been unsuccessful had the claim proceeded to trial does not normally affect the enforceability of a settlement agreement. See Johnson v. St. Paul Ins. Cos., 305 N.W.2d 571, 574 (Minn.1981). On the other hand a settlement agreement is a type of contract, State v. Philip Morris, 713 N.W.2d 350, 355 (Minn.2006), which itself might offend public policy. Cf. Goodrich v. Nw. Tel. Exch. Co., 161 Minn. 106, 201 N.W. 290, 292 (1924) (defendant's agreement to waive defense of illegality "would be tainted with the vice of the original contract").


11
In Hoyt v. Wickham, 25 F.2d 777 (8th Cir.1928), decided under Iowa law, we drew a distinction between the settlement of a claim of doubtful validity, for which finality should be preserved, and the settlement of a claim that is invalid on its face as offensive to public policy. Id. at 781. The defendant in Hoyt had argued that plaintiffs should be prevented from enforcing a settlement agreement because their settled claim centered around an illegal gambling contract. Id. at 777-78. Plaintiffs disputed this characterization of their contract both factually and legally. Id. at 778. We concluded that the original claim was not a per se illegal demand, but rather one of reasonably disputed validity. The defendant was therefore estopped by the settlement agreement from challenging the contract's legality. Id. at 781. We think the distinction drawn in Hoyt, between per se invalid claims and claims of doubtful validity, is equally appropriate under Minnesota law.


12
The settlement agreement under which Katun seeks to recover would thus be unenforceable only if the original claim for indemnification were per se invalid. Although "indemnification will not be allowed if its application would violate public policy," United States v. J & D Enters. of Duluth, 955 F.Supp. 1153, 1159 (D.Minn. 1997), a contract is not void as against public policy in Minnesota "unless it is injurious to the interests of the public or contravenes some established interest of society." Isles Wellness, Inc. v. Progressive N. Ins. Co., 725 N.W.2d 90, 93 (Minn. 2006) (citation omitted). A court's power "to declare a contract void for being in contravention of sound public policy is a very delicate and undefined power, and . . . should be exercised only in cases free from doubt." Hollister v. Ulvi, 199 Minn. 269, 271 N.W. 493, 498-99 (1937) (quoting Cole v. Brown-Hurley Hardware Co., 139 Iowa 487, 117 N.W. 746, 747 (Iowa 1908)).


13
Katun argues that the indemnification provision at issue here does not violate public policy because it does not promote illegality or free any party to act with impunity. Katun acknowledges that a party may not insure itself against penalties for conduct not yet committed, Zerby v. Warren, 297 Minn. 134, 210 N.W.2d 58, 64 (1973) (indemnification for violation of public duty); Rosenbloom v. Flygare, 501 N.W.2d 597, 602 (Minn.1993) (insurance against punitive damages), since legal sanctions are an important means by which society discourages future misconduct. See Nw. Nat'l Cas. Co. v. McNulty, 307 F.2d 432, 440 (5th Cir.1962). Katun argues that the present case is distinguishable from Zerby and other similar precedent for two separate reasons. First, the indemnification provision was adopted not for the benefit of Katun, but rather for the benefit of PNA, an innocent third party. Second, the indemnification provision did not insure any party against the consequences of future misconduct and therefore did not encourage illegality.


14
In response to Katun's first argument, Clarke points to paragraph 39 of the complaint which states that PNA "has suffered untold millions of dollars in additional losses not at issue in this lawsuit." Clarke contends that this shows that it was Katun who originally sought indemnification for its criminal penalties. Clarke overlooks the fact that in the very next paragraph of the complaint it is alleged that both PNA and Katun made indemnity claims under the merger agreement, seeking compensation for losses associated with Katun's criminal conviction "[a]mong other things." Moreover, since Katun is a subsidiary of PNA, a loss to Katun is also a loss to PNA. Cf. Wackerbarth v. Weisman, 207 Minn. 507, 292 N.W. 214, 215 (1940) (shareholders have proprietary interest in corporation). The settlement agreement which was attached to the complaint provided that payment was to be made to PNA or its designee. Granting Katun the benefit of all positive inferences as we must, see Knieriem, 434 F.3d at 1060, we conclude that the complaint has alleged that both Katun and PNA brought claims for indemnification and that these were settled in exchange for compensation to PNA.1


15
The circumstances here are also distinguishable from Zerby and similar cases in that this agreement involves compensation for losses attributable to acts that had already occurred prior to the promise to indemnify. An indemnification agreement releasing a departing company officer from all liability arising out of his prior association with the company was upheld in Feuer v. Menkes Feuer, Inc., 8 A.D.2d 294, 187 N.Y.S.2d 116 (1959), even though the officer sought to be indemnified against penalties imposed for previously violating customs requirements. Id. at 120. Since there was no concern that the agreement would encourage illegality, see id., the court concluded that the contract was a reasonable if not desirable means of allocating unidentified financial responsibility for identifiable acts. Id. at 121. The court also observed that it was well established across the country that "one may make an agreement to be indemnified or to indemnify with respect to a crime or illegal act which occurred prior to the making of the agreement." Id. at 121; see also Pettit Grain & Potato Co. v. No. Pac. Ry. Co., 227 Minn. 225, 35 N.W.2d 127, 131-133 (1948) ("public policy does not forbid bargains for protection from the consequences of" illegal acts where agreement is not itself part of illegal scheme and does not encourage illegality).


16
The reasoning in Feuer is instructive here. The indemnification provision contained in the merger agreement was not a form of insurance against future acts, but rather protection against the financial consequences of actions that had already occurred and were not within PNA's control. Clarke and the other selling shareholders who had controlled the company before the sale were in the best position to have known whether legal violations had been committed prior to the acquisition, and they represented to PNA that none had. PNA relied on their representations when it agreed on a purchase price for the company. The indemnification provision permitted PNA to recover part of that purchase price if the representations proved to be false and if Katun's value turned out to be overstated due to undisclosed criminal violations. We conclude that the indemnification provision here did not free either PNA or Katun from the consequences of any future criminal actions.


17
Clarke argues that the settlement included payment for criminal penalties attributable to postsale conduct, noting that the settlement amount is nearly identical to the total amount of Katun's sanctions even though two of the three schemes continued after the acquisition. In Clarke's view PNA could not legally recover in full, even under the reasoning in Feuer, because some of the criminal penalties should be attributed to misconduct that occurred after the indemnification agreement was made and the company changed hands. We find this argument unpersuasive for two reasons. We are obliged at this stage to take the factual allegations in Katun's complaint as true, including its allegation that the settlement agreement resolved claims arising from "illegal conduct that pre-dated the July 5, 2002 closing date" (emphasis added), an allegation that is not inconsistent with the terms of the indemnification provision or the settlement agreement. Moreover, the degree to which the parties' losses are attributable to presale or postsale conduct is precisely the kind of disputed factual issue that the Hoyt court refused to examine because the parties had settled their differences. 25 F.2d at 781. Even assuming that the settled amount exceeds the amount that PNA would have been able to recover at trial, this would be an insufficient basis on which to upset the freely negotiated settlement of the parties. See Forcier v. State Farm Mut. Auto. Ins. Co., 310 N.W.2d 124, 128-29 (Minn.1981) (refusing to examine settlement amount to determine whether it had been influenced by provision in insurance policy that violated state law).


18
Because the indemnification provision at issue in this case did not create the kind of negative incentives normally associated with attempts to insure against penal sanctions and because a contract should not be voided absent an unmistakable violation of public policy, see Hollister, 271 N.W. at 498-99, we cannot conclude that the claim for indemnification was an illegal demand or patently in violation of public policy. Although there may have been legitimate doubts about the appropriateness of the settlement amount or of Katun's initial participation in seeking indemnification, these disputed issues were laid to rest with the settlement agreement. See Hoyt, 25 F.2d at 781. It does not clearly offend public policy to permit a purchaser to protect itself from the consequences of actions, legal or illegal, taken prior to its acquisition of the company.


19
Katun also argues that the defense of in pari delicto does not bar the present action because it was waived by the settlement agreement, or alternatively because it is inapplicable to this action to enforce that agreement. Under the in pari delicto doctrine courts will decline to enforce the rights of either party to an illegal transaction. See State v. AAMCO Automatic Transmissions, Inc., 293 Minn. 342, 199 N.W.2d 444, 448 (1972). At least one court has treated the defense as waivable, see Pinto Trucking Serv., Inc. v. Motor Dispatch, Inc., 649 F.2d 530, 534 (7th Cir. 1981), but we need not address the issue of waivability since we conclude that the doctrine would not bar Katun's action in any event.


20
Although the doctrine of in pari delicto is "based on judicial reluctance to intervene in disputes between parties who are mutually involved in wrongdoing," Brubaker v. Hi-Banks Resort Corp., 415 N.W.2d 680, 683 (Minn.App.1987), the fact that both parties to a lawsuit have committed wrongful conduct will not trigger the defense unless "the court is asked to do something that is itself part of the unlawful act." Id. at 684. The fact that both Katun and Clarke have been previously convicted for participating together in illegal acts does not alone defeat the present claim. Minnesota courts will not apply the doctrine "to defeat the performance of a contract which was in itself not illegal" either on its face or in its enforcement. Brubaker, 415 N.W.2d at 684. Because we have already concluded that the settlement agreement was not part of an illegal scheme, we also conclude that Katun's claim is not barred by the doctrine of in pari delicto.


21
For these reasons, we reverse the judgment and remand to the district court for further proceedings and consideration of Katun's motion for summary judgment.



Notes:


1
 It was PNA rather than Katun which was responsible for sending notice to the selling shareholders of its intent to pursue indemnification. Although these notices were not attached to the pleadings, the district court referenced them in its decision. Since neither party objected and the notices do not contradict the complaint, we are not precluded from considering themSee Missouri ex rel. Nixon v. Coeur D'Alene Tribe, 164 F.3d 1102, 1107 (8th Cir.1999).


