The Tea Party is the most maligned major political movement of our time. But it has been maligned for all the wrong reasons. I am happy to report, though, that if the Tea Party learns from its mistakes, it can still be a powerful force for good.

What does everyone get wrong about the Tea Party? When Democratic Rep. Charlie Rangel described it as a collection of “mean, racist people,” he was doing little more than bluntly restating views that are widely held on the left. When Tea Party conservatives counter such charges of racism by noting the popularity of African-Americans like Ben Carson, Allen West, Herman Cain, and South Carolina Sen. Tim Scott, they are routinely dismissed. One scholar, University of Washington political scientist Christopher Parker, went so far as to attribute the rise of conservative black candidates and activists to Tea Party prominence to the triumph of tokenism. Yet when you delve into Parker’s data on the racial attitudes of white voters toward blacks, as Robert VerBruggen and Cathy Young did a few years back, you’ll find that the views of whites who support the Tea Party and those who don’t are not that far apart. It turns out that whites who have negative attitudes about minorities tend to also have negative attitudes about other whites. You’d be on much firmer ground calling the Tea Party cranky than you would be calling it racist.

The Tea Party right is accused of more than just bigotry. In The Tea Party and the Making of Republican Conservatism, Harvard sociologist and political scientist Theda Skocpol and her co-author Vanessa Williamson observe that Tea Party conservatives will often distinguish between government transfers that flow to deserving productive citizens (like themselves) and those that benefit people they see as undeserving freeloaders (unlike themselves). Their work dovetails with the oft-heard notion that the Tea Party’s anti-government rhetoric is hypocritical, and that any “deservingness” distinction its members make is both bogus and transparently self-serving. But this distinction was absolutely central to FDR’s New Deal and Bill Clinton’s commitment to help those who “work hard and play by the rules.” Few serious people deny that means-tested programs can make it hard for poor families to climb the economic ladder, and there is nothing hypocritical about believing both that these programs should be made more work-friendly and that the safety net for older Americans should be protected.

Finally, the Tea Party has been assailed as inauthentic, a faux grassroots, “astroturf” movement financed by shadowy elites who have essentially duped an army of cranky retirees into doing their bidding. You hear this not only from left-liberals like Chris Hayes, the MSNBC host and author of Twilight of the Elites, but occasionally from Republicans like Ann Coulter who are looking to defend GOP incumbents facing Tea Party challengers. The fact that wealthy campaign donors are far more likely to support establishment Republicans over Tea Party conservatives in GOP primaries tells a different story.

Yes, the spending habits of some Tea Party organizations should be cause for embarrassment, a beat that Slate’s David Weigel has on lock. But is this really a Tea Party-specific problem? I would argue that the presence of hucksters who use politics for personal gain is simply a long-standing tradition.

So what is really wrong with the Tea Party, then? It’s that it has so far failed to live up to its populist convictions.

If the Tea Party were to fight crony capitalism as hard as it fights wasteful spending, and if its members were to train their anger on the Wall Street-Washington axis that deserves so much of the blame for our stagnant economy, it would be the most constructive and powerful political force of our time. There is still time for the Tea Party to change course. But if that’s going to happen, we first have to understand where the movement first went wrong.

The Tea Party emerged in opposition to President Obama’s call for fiscal stimulus and for the creation of a new health entitlement program. Yet it also represented a backlash against entrenched, moneyed Republican elites. And Republican elites had it coming. They had grown unresponsive to the real needs of rank-and-file Republican voters throughout the 1990s and the 2000s. During George W. Bush’s second term, his domestic policy efforts centered around an ill-timed effort to modernize Social Security—an idea that had almost no popular resonance—and an effort to create a guest-worker program that seemed tailor-made to serve the interests of big business. Though the Bush White House did tepidly advance a few health reform ideas, it didn’t put them front and center, despite the fact that large numbers of low- and middle-income Americans were at risk of losing their insurance and millions of others were forced to get by without any health coverage at all. The Iraq quagmire reinforced the sense that the GOP establishment had lost its way. It’s no wonder that grassroots conservatives were furious, and ready to revolt.

When the financial crisis hit and Wise Men of both parties responded by backing bailouts that favored the wealthy and connected, the pot boiled over. Grassroots conservatives cast a wary eye at all new efforts to expand Washington’s reach and influence, fearing that every new program from the technocratic Obama administration was another power grab designed to reward Washington insiders. Republicans who worked with the new president were deemed traitors to the cause. The entire system had to be torn down and rebuilt according to America’s founding principles.

I get the anti-bailout anger. I also get why conservatives who had grown sick and tired of Bush were even more skeptical of Barack Obama, who seemed to double down on the notion that Washington knows best. What was lost in the immediate aftermath of the crisis, however, was that not all bailouts are created equal. When Rick Santelli, the CNBC personality widely credited with giving the Tea Party movement its name, raged against an Obama administration initiative designed to help underwater borrowers way back in February 2009, he claimed that it would force responsible taxpayers to reward irresponsible borrowers who bought more house than they could afford. And plenty of conservatives bought into the idea.

The problem with Santelli’s line of thinking is that the vast majority of low- and middle-income borrowers with underwater mortgages were responsible, hardworking taxpayers who were caught in a maelstrom. Real estate brokers lied about the value of homes, as did real estate appraisers, who worked with mortgage lenders to load families up with debt. Mortgage lenders then sold their mortgages to other investors, and thus didn’t bear the risks associated with their irresponsible lending. There was plenty of blame to go around. So why did Santelli insist that only borrowers should be left holding the bag? Why shouldn’t at least some of the TARP money that had been devoted to rescuing America’s financial system be used to ease the burden on borrowers?

There was at least one Republican who understood what had gone wrong and what it would take to fix it, but it wasn’t Michele Bachmann or Jim DeMint or some other Tea Party rabble-rouser. It was Glenn Hubbard, a paragon of the Republican establishment who had served as chairman of George W. Bush’s Council of Economic Advisors. As early as 2008, Hubbard realized that allowing low- and middle-income borrowers to go under would spark a vicious cycle. The first wave of foreclosures would depress housing values, sparking a second and a third wave. Cash-strapped families would be forced to tighten their belts, which in turn would cause spending to collapse. As spending collapsed, businesses would be forced to shrink their operations, lay off workers, and in some cases even go bankrupt. Unemployment would skyrocket, which would in turn lead to more foreclosures. If this scenario sounds familiar, that’s because it is exactly what happened during the Great Recession.

Starting in 2008, Hubbard and a number of his colleagues at Columbia University, Christopher Mayer most prominent among them, pressed the case for aiding homeowners. They argued that because Congress had, rightly or wrongly, already taken over so much of the mortgage market, the federal government ought to use its power on behalf of families who’d been devastated by the housing bust. Among other things, they called for writing down mortgages for responsible borrowers—not house-flippers or people who lied about their incomes on their mortgage applications, but working families doing their level best to make their payments—with the cost of the write-down to be borne equally by mortgage lenders and taxpayers. Though it might look as though lenders were being forced to make a sacrifice, this approach would have left them much better off, as it would have prevented even more of their loans from going bust. Taxpayers, meanwhile, would have saved enormous amounts of money, as sparing millions of families the pain of foreclosure and joblessness would have held down the costs of unemployment benefits, food stamps, and other transfers designed to keep struggling families afloat.

So why didn’t Hubbard and Mayer win the argument? Or, put another way: Why did Hubbard’s real populism lose out to the fake populism of Santelli and others who maintained that forcing mortgage lenders to accept their share of the blame for the crisis was somehow unfair? One theory is that it was because investors who’d snapped up underwater mortgages were making a huge profit off of them, and they didn’t want anyone to come and stop the gravy train.

Imagine if the Tea Party movement had taken Hubbard’s position and not Rick Santelli’s. The last few years of American politics would have looked very different. The Tea Party could still have made the case that President Obama’s fiscal stimulus and his health law were alarming examples of government overreach. Yet they also would have demonstrated their willingness to stand up to Wall Street, and their desire to protect the interests of those who’d been hurt most by the housing bust. They might have even helped prevent the catastrophic drop in Hispanic household wealth that, in my view, did far more to turn Latino voters against the GOP than conservative opposition to comprehensive immigration reform.

It is too late for the Tea Party to fully undo the damage caused by the Great Recession. But Tea Party conservatives can lead the charge to fix the inflexible debt contracts that are foisted on Americans by Fannie and Freddie and the tax code, and that threaten calamity the next time we have a recession. They can follow the lead of Louisiana Sen. David Vitter, who has called for tough new financial regulations to curb the power of the big banks, and Utah Sen. Mike Lee, who has declared war on corporate welfare. Instead of just paying lip service to fighting crony capitalism, the Tea Party can renew the GOP and American democracy by putting its money where its mouth is.

This piece has been edited for clarity.