The self-correction mechanism of American democracy came out in force Tuesday in repudiating the dark, twisted path President Trump has us traveling down.

But it is an uphill fight against something that never should have happened in the first place. Our democracy isn’t and can’t be a perfect one, and flaws and distortions have been built into our system of government from the beginning. It has always been hoped that these distortions would tend to cancel each other out over time, and they still may. But in 2016, they acted in concert and we had the blackest of black swan events. It wasn’t entirely accidental.

Let us count the ways.

The Senate: The crazy reality of every state getting two senators regardless of population has been explained as some sort of beautiful compromise, but it is currently yielding effects that fly stupendously in the face of nationwide popular will.

The electoral college: It’s another strange apparatus that has been defended in a lot of convoluted ways, but none of that obscures the fact that the past two Republican presidents were brought to power with the majority of voters having voted for their opponent. That’s two-thirds of the three most recent presidents.

The House: The so-called “People’s House” has become the computer’s house, as data processing power has been cynically deployed to rig districts to the degree that parties and legislators get to select their voters and relegate other voters to malformed and unrepresentative dead zones. This has had the measurable effect of congressmen being sent to Washington in numbers that bear no relation to the statewide party vote totals.

Money: This is not traditionally thought of as gerrymandering, but the Supreme Court rulings severely curtailing meaningful checks on the use of money mean the only meaningful checks in the campaign system are the ones rich donors write to buy an outcome they like. Just one more way the power of ordinary voters is distorted or overridden.

Who has benefited from all this distortion? Republicans. Republicans hold all the elected branches of government and are well on their way to appointing the other branch despite a public that has been voting for different results.

And how do the Republicans use this malapportioned power they wield? With all due humility and recognition of their actual minority support? Oh, sure. They may say things like Trump said on election night: “Now it’s time for America to bind the wounds of division. I pledge to every citizen of our land that I will be president for all Americans, and this is so important to me.” Then they proceed to deploy the chainsaw to America’s wounds of division, to destroy the health-care system, the tax system and the spirit of inclusiveness that the majority of voters actually want.

The voters who don’t support the GOP’s manifestly undemocratic agenda are trying as we speak to correct these deliberately exploited distortions and were hearteningly successful on Tuesday. And you can be certain of the GOP response. Republicans know they don’t represent popular will, and they have been trying with distraction and outright lying to twist the system into the undemocratic moment we are living in. They will not adjust to Tuesday’s results by moving to the center; they will react by doubling down on their agenda and hastening to implement it while they can. And if that weren’t bad enough, it also happens to be Trump’s intention to find a way to short-circuit ANY eventual correction to his power.

It should not have to be so frustratingly difficult for the majority of Americans to set this right, but they find that the deck has been stacked against them. So it is up to the American people to find a way to overcome this, before a majority Republican-appointed Supreme Court finds a way to make the merely unfair into the virtually impossible.

Tuesday was a promising beginning.