We’ve all said things we come to regret, where what sounds like a good idea at the time ends up as what the f— was I thinking? In an online culture where CEOs are celebrities and tweets go viral overnight, one mistake can turn into a full-blown crisis.

Who can forget Hillary Clinton’s classic line just ahead of the 2016 presidential election: “You can put half of Trump supporters into what I call the basket of deplorables,” she said, meaning those who are “racist, sexist, homophobic, xenophobic, Islamophobic.”

What she thought was red meat for her base ended up blowing up in her face. When she tried to walk it back the next day, Clinton said, “I regret saying ‘half’ – that was wrong,” leaving cynics to ponder whether she actually meant to say “all,” instead. That’s not how you defuse a crisis; that’s how you perpetuate it.

That was the turning point in the campaign. That – not the million and one excuses she’s constantly conjuring up – is what cost Clinton the White House.

Related: The Real Reason Hillary Clinton Lost

Every political and business leader knows that crises come with the territory. But the crises that often do the most damage are the ones we create for ourselves. Those unforced errors aren’t just the ones we regret the most, they’re the ones that come back to haunt us if we don’t handle them right in real time.

We all make mistakes, and we all have the power to make them better or worse after the fact. As jazz great Miles Davis once said, “When you hit a wrong note, it’s the next note that makes it good or bad.” Inherent in every self-made disaster is the potential for redemption. A little humility goes a long way.

I remember when 23-year-old Stanford grad Evan Spiegel had raised $163 million from some of Silicon Valley’s top VC firms and turned down a $3 billion cash offer from Facebook’s Mark Zuckerberg to acquire his young ephemeral messaging startup, Snapchat. Spiegel was on top of the world.

That changed the instant Gawker site Valleywag released a string of emails from Spiegel’s frat days that included graphic references to sex, drugs and alcohol abuse. Instead of making excuses or simply ignoring the firestorm of bad press, he swiftly owned up to it, issuing a sincere and unconditional apology:

“I’m obviously mortified and embarrassed that my idiotic emails during my fraternity days were made public. I have no excuse. I’m sorry I wrote them at the time and I was jerk to have written them. They in no way reflect who I am today or my views towards women.”

Related: If You Want to Destroy Your Career, Do This

That was exactly the right thing to do. Spiegel didn’t sidestep. He didn’t wait. Not only did he get to keep his job, Snapchat emerged as a social media powerhouse. Today Snap is a public company worth $17 billion. Not too shabby.

What makes that particular example so stunning isn’t just the level of maturity Spiegel displayed but its rarity, even among experienced executives who should know better. Countless stories come to mind but my hands-down favorite is Apple’s iPhone 4 reception problem known as Antennagate, when Steve Jobs famously said, “Just avoid holding it that way.”

Not Jobs’ finest moment.

It’s painful to look back and see how much our unforced errors cost us, especially the ones we failed to own up to and handle as we should. Save yourself the trouble and deal with them proactively. Crisis management may not be rocket science, but for far too many leaders, it may just as well be.

A version of this originally appeared on Fortune.com.

Image credit United States Mission Geneva via Flickr