For years, compliance and legal settlements at the Environmental Protection Agency (EPA) against corporate wrongdoers have funneled millions of dollars to nonprofit, ideology-driven organizations to promote their agendas. Under the watchful eyes of Administrator Scott Pruitt at the EPA and General Jeff Sessions at the Justice Department and, perhaps, with Congress’s help, that could change. What is needed is a system of checks and balances that ensures corporate actors who fail to follow the rules or comply with U.S. environmental law face appropriate corrective measures without being forced to line the pockets of ideological advocacy groups.

In 2016, Harley Davidson agreed to a multi-million-dollar fine for selling devices that allowed motorcyclists to cheat U.S. emissions standards. The 340,000 devices, called “super tuner” kits, sold to customers raised harmful emissions. On top of a $12 million civil penalty, the settlement with EPA also included $3 million that, in part, went to an NGO to swap out wood burning stoves with new ones. However, the DOJ has since proposed reversing the Obama-era requirement, ending payments to outside groups that are not parties or victims in lawsuits.

Ten states and the District of Columbia are challenging that decision, citing the argument that older wood-burning stoves represent a health hazard. Additionally, 11 states’ attorneys general are calling for the court to deny the new settlement agreement and restore the $3 million penalty.

The EPA’s corrective measures for companies that do not comply with U.S. law are badly needed. But it is equally important for the DOJ to reverse the Obama-era slush fund payments; there must be consequences for corporations who game the system and break the law. However, these settlements should not be used to bankroll nonprofit groups to further their ideological agenda.

Another, case in point is the Volkswagen AG scandal from 2015. As part of the VW’s emissions settlement , the company agreed to invest $2 billion on electric vehicle infrastructure in the U.S. While this money may seem connected to the emissions cheating, in reality, it went to a nonprofit interest groups unrelated to the settlement and parties involved. The VW settlement follows not one, but two unsuccessful requests for congressional funding for electric vehicle infrastructure by the Obama administration.

VW wasn’t the only company required to pay money to finance third-parties through slush funds. In the $20.8 billion settlement for the Gulf oil spill, the largest settlement in U.S. history, BP was ordered to pay up to $8.8 billion to the Natural Resource Damage Assessment Trustees in order to fund restoration work on the Gulf of Mexico. Again, while this may seem related, the money going to coastal restoration was also used to fund projects not directly related to the spill.

This a problem. Ideology should not overshadow compliance of the law and its enforcement. Allowing third-party payments that are vaguely related or completely unrelated to the damages caused by the company’s actions is not an enforcement effort, but a for government to pick winners and losers based on ideology. Regulatory enforcement should be a straightforward and transparent process, unclouded by political agendas.

The pending Stop Settlement Slush Funds Act of 2017 would make it illegal to allocate settlement funds to projects run by third-party groups. The money would instead be directed to help the victims or to taxpayers.

Lawmakers should support this bill to end the funding of nongovernment third-party organizations through regulatory fines and enforcement. Corporations that skirt the system should of course face fines. But those settlements must directly fund those harmed, not ideological agendas. Politics has no place in making sure corporations adhere to regulatory standards.

Jack Rafuse, Ph.D., served as White House senior energy and environmental advisor during the Nixon administration.