The coronavirus outbreak is exposing the many ways our infrastructure, economy and health care industry were unprepared to combat an epidemic. To make up for that shortfall, the White House and Congress reached a deal on a more than $2 trillion stimulus package. While we are still combing through all of the details of the legislation, it includes direct payments to people in need alongside corporate handouts for companies like Boeing. But as these corporations fly away with our taxpayer dollars, we should remember and apply lessons learned to avoid emergency spending authorities from being misused and how to best budget in an emergency.

In what can often feel rare in government work, the last major stimulus included a model of successful oversight. The American Recovery and Reinvestment Act of 2009 ultimately unleashed $831 billion in spending and tax cuts. While numerous watchdogs worried that there would be massive waste and fraud and corruption in how contracts and spending were awarded, the law also created the Recovery Accountability and Transparency Board, which set some of the highest standards for spending transparency and analysis.

In the end, the level of fraud was 0.001 percent, and even opponents of the stimulus, like former Chairman of the House Oversight and Reform Committee Darrell Issa, R-Calif., concluded that its various transparency, accountability and reporting requirements should be replicated across the federal government. Fortunately, it looks like a similar model will be put in place for this latest package as well.

There are also plenty of cases where emergency spending and authorities haven’t had sufficient oversight. And the biggest elephant in the room in that regard is the Pentagon’s overseas contingency operations, or OCO, account — a fund that was established for unplanned military contingencies and disaster spending but in practice has been funding not just wars but also non-emergency needs for 19 years and lacks guardrails to make sure that the spending is actually meeting its mission.

As the Congressional Research Service pointed out, historically this kind of funding mechanism was used for the initial stages of wars, as was the case for Vietnam and the first Gulf War. Under those practices, the Congressional Budget Office found, between 1970 and 2000, OCO-like spending accounted for only 2 percent of overall Pentagon spending. The Congressional Budget Office told Congress that reliance on this kind of off-budget funding hurt planning and made it more likely the Defense Department would pursue lower priority, more expensive programs that wouldn’t normally make the cut.

Emergencies and spending that comes with them need oversight mechanisms to work. Initially created as part of a supplemental budget process to cover unexpected costs of the wars in Iraq and Afghanistan, OCO became a slush fund for various Pentagon and congressional projects. Upticks in this spending convinced Congress of the need to create a Commission on Wartime Contracting to enhance oversight, but that commission expired years ago and the off-budget spending has only continued.

Endless wars have unfortunately come with endless spending and very little accountability. Since 2001, we have spent $2 trillion through the use of the overseas contingency operations funds on global war.

Congress and the Pentagon further misused so-called emergency spending by using it to circumvent spending caps put in place under the Budget Control Act. These kinds of budget games underwrite wasteful spending.

For example, last year Congress spent $1.87 billion for F-35s, adding 20 jets beyond the Pentagon’s already high request. If we hadn’t bought any F-35s last year, and waited for testing to be complete, we would have had enough money to purchase nearly 1 million ventilators for our response to COVID-19.

The abuse of emergency authorities to divert $7.2 billion from the Pentagon to go to the border wall further underscores the misuse of emergency authorities. For the same amount of money we could have purchased 144,000 high-end ventilators to support the current COVID-19 battle. This misallocation of resources becomes even more disturbing given that hospitals have reportedly not been able to afford keeping this equipment on hand.

An emergency fund at the Pentagon might be justified if it is used as it has been historically — for true contingencies — and if it is subject to the kind of oversight and reporting requirements we saw during the economic stimulus process in 2009 to ensure those funds are awarded fairly and effectively.

Now that we’re in the final year of the Budget Control Act, we have the chance to think differently about how Pentagon spending might look different. Our current crisis, and the government’s struggle to find the funds to respond, provide an opportunity to reassess our budget priorities and significantly cut defense spending. And that has to start with sunsetting the Pentagon’s slush fund known as OCO.

Erica Fein is the advocacy director at Win Without War. Mandy Smithberger is the director of the Center for Defense Information at the Project On Government Oversight.