There is not much good news coming out of Brazil these days.

Political corruption scandals continue to rock the country, and the political instability has caused the nation’s stock market to crash.

Judge Sergio Moro, who presides over the biggest corruption scandal of them all (dubbed Operation Car Wash), has become something of a folk hero to the millions of Brazilians who are eager to see an end to the cronyism and corruption that has dogged the country for decades, both in the public and private sectors.

Brazil’s current center-right president, Michel Temer, who succeeded former President Dilma Rousseff after her impeachment and removal from office last year, is now facing calls for impeachment himself amid allegations of corruption.

But surely another big reason why Brazilian leftists are trying to remove Temer is that he is pushing two big efforts to reform their costly statist programs.

As the Financial Times reports, “Brazil has 17,000 unions compared with 168 in the U.K. and 100 in Argentina, a country known for its contentious labor relations.”

Brazil’s labor law, which dates from 1943, makes it too easy for workers to sue their employers. It increases the cost of doing business, hurting Brazil’s ranking in worldwide investment climate studies such as the World Bank’s “Doing Business” survey.

Temer is also pushing for reforms to change the country’s fiscally unsustainable pension system, which currently gives everyone the right to retire in their early to mid-50s and provides luxurious defined benefits packages for public sector retirees.

Temer’s proposed revisions will raise the minimum retirement age to 65 for men and 62 for women—much closer to the average in member countries of the Organization for Economic Cooperation and Development. The U.S. retirement age, by comparison, is 67.

The fact that many politicians in Brazil across the spectrum have been touched by corruption allegations does not alter the fact that the country must reform its economy.

The sad news for Brazilians is that these corruption scandals could have been anticipated—maybe even avoided.

Brazil’s scores in the annual Heritage Foundation Index of Economic Freedom deteriorated for years during the long rule of former leftist-populist Presidents Dilma Rousseff and “Lula” da Silva.

So, even if Temer is forced out, his successor will still have to confront these enormous problems—and somehow solve them.