Peabody Energy, the world’s largest private-sector coal company, is not in great financial shape. Last month, it casually skipped a $71 million interest payment, and analysts are speculating that it may be edging toward bankruptcy. Standard and Poor’s recently downgraded Peabody’s credit rating to a “D.” The company has $6.3 billion in outstanding long-term debt.

If you’re cheering for the death of coal, that might sound like good news. But there’s a nasty catch: Peabody’s financial troubles mean it might not be able to pay to clean up its messes, and restoring landscapes and repairing streams and rivers can be expensive. The company has “self-bonded” to pay up to $1.4 billion in reclamation costs at its mines in the United States — and self-bonding means we’re trusting it to do so.

While coal companies usually offer up collateral or contract out in order to guarantee that cleanup will be paid for, it has become common in recent years for companies to simply pledge that they’re going to deal with the costs. These self-bonds (as opposed to, say, surety bonds, which rely on third-party insurers) only rely on the name and financial stability of the company itself. In other words, they’re basically billion-dollar IOUs, written on fancy letterhead instead of Post-it notes.

At this point, you’re probably wondering why a demonstrably financially unstable company is able to get away with just promising to pay $1.4 billion in cleanup costs. That’s because the federal government and many states have loose rules that allow self-bonding instead of a more reliable mechanism to ensure that reclamation is paid for. And even troubled companies like Peabody can often meet requirements for self-bonding by applying through subsidiaries that look fine on paper.

“These rules were created in a different era, when nobody thought that coal companies could go out of business,” Clark Williams-Derry, director of energy finance at the Sightline Institute, told Grist. With Arch Coal and Alpha Natural Resources both having recently filed for bankruptcy, that era is clearly behind us. “The only solution at this point is to recognize that self-bonding has completely failed, and that the only way forward is to completely change the rules.”

State mining authorities could change those rules and instead require companies to post surety bonds or set aside cleanup cash in an escrow account. Or they could continue to allow self-bonding, but not through 100-percent-owned subsidiaries. Some states already don’t allow self-bonding at all, like Kentucky, Maryland, and Montana, according to a survey conducted by the Interstate Mining Compact Commission.

The federal government could help too by updating its rules. Right now it allows self-bonding if a coal company is “financially healthy,” but that definition is riddled with loopholes.

Credit ratings firm Fitch argues that Peabody’s recently announced risk of defaulting on its debts could prompt regulators to change their rules. “Citizen complaints, scrutiny from the attorney general of Illinois and congressional calls for investigation follow a record number of financial defaults in the U.S. coal sector foreshadowing even tighter self-bonding rules,” wrote the firm in a press release. With many coal companies on their last legs and taxpayers ultimately on the line, here’s hoping Fitch is right.