Cringe and repeat.

White House officials were embarrassed by President Trump appearing to accept Vladimir Putin’s denials of Russian election meddling over his own intelligence agencies’ conclusions during Monday’s controversial Helsinki summit, Axios reported. And CBS anchor Margaret Brennan said some U.S. officials told her they were switching off their TVs during the speech, according to the Associated Press.

But mortifying bosses abound past the Oval Office and NBC’s fictional “Office.” “I am hurt, embarrassed, and disappointed,” tweeted “Roseanne” co-star Emma Kenney in May, for example, after Roseanne Barr’s racist tweet that eventually tanked the ABC revival. “The racist and distasteful comments from Roseanne are inexcusable.”

If your boss is a constant embarrassment — whether it’s due to sloppiness, incompetence or some moral failing — here’s how to handle it:

If it’s a one-off situation, “there may be extenuating circumstances; you want to give things a chance to see how it unfolds. Maybe the boss is just off his game that day,” marketing strategy consultant Dorie Clark told Moneyish. “You need to wait to have the facts come in, essentially, before rendering a judgment.” But if your boss’s embarrassing behavior is a pattern, Clark said, the next step is to ask whether it’s embarrassing on a moral or philosophical level (e.g. sexist or derogatory remarks), a more pedestrian reason (bad table manners) or incompetence (messing up basic tasks).

Also read: No respect for your boss? Here’s how to grin and bear it

Be part of the solution. If there’s a possibility of remedying their behavior, Clark said, you might find small, subtle ways to assist. Say your boss is a terrible public speaker: “You can just ask, ‘So, how are you feeling about the upcoming presentation?’” she said. “And it’s quite possible that your boss may say, ‘Oh, I’m really dreading it; I hate public speaking.’” You might offer to do the presentation for them, if that’s appropriate, or suggest resources you’ve found beneficial. “There are ways you can try to be helpful without appearing accusatory or insulting their skills,” Clark said.

Preempt their embarrassment. You could try to “war-game” potential scenarios to figure out what might go wrong, Clark suggested. If your manager has a poor grasp of details and facts, for example, you might ensure that they go into meetings with a comprehensive list of talking points. Or if your boss has a reputation for getting a little too informal or cozy with coworkers — “something that’s not an actionable offense, but nonetheless makes people uncomfortable,” Clark said — you could make sure someone is present to supervise those interactions.

If you sense potential problems on the horizon, career coach Maggie Mistal said, ask if you can offer some tips and pointers — then use gentle language like “you might want to…” “Maybe you’re better at managing a situation than your boss,” she said, “and your boss might come to really rely on you for that.”

Also read: Here’s how to manage your boss like a boss

Don’t get tarred by the same brush. You may need to ensure that “your brand is viewed as separate from theirs,” Clark said. Build connections with people both inside and outside your organization, independently of your boss. Strive for visibility by raising your hand for projects or committees, she added: “Barring other information, people are naturally going to affiliate (you two) in their minds: ‘She hired him, so he must be just like her,’” she said. “So you need to give people the opportunity to get to know you as yourself so that they’re not filling in the blanks in a way that is disadvantageous to you.”

“If you need to be at an event with your boss, and your boss has a reputation for maybe becoming sloppy or embarrassing, don’t stick around — go early and leave early,” added Mistal. “At least if you’re not there, you’re not going to be associated. Excuse yourself from the situation before it happens.”

Don’t talk trash. “That person’s still your boss, and even if you don’t agree with them or respect them or like them, you still need to respect the position,” Mistal said. “If you don’t have anything nice to say, don’t say it at all.” Clark agreed: “You never want to be in a position where you are caught criticizing your boss in a way that could potentially get back to them.”

Also read: Why your abusive boss might actually try to make nice

If someone talks negatively about your boss, try and respond with “something that is a compliment about your boss that you genuinely believe,” Clark suggested. “You can just smile and say, ‘Well, one of the things that I really like about Roger is that he is a manager that really allows a lot of independence,’” she suggested saying. “So I enjoy working for him because there’s a lot of opportunity to explore my own professional growth.”

And if you actively disagree with your boss’s actions, she added, you can express that publicly without resorting to ad-hominem attacks. If they laid off 1,000 people last week, for example, you can admit that you struggle with that fact and wish it had gone differently. “That’s not a condemnation of your boss; that is an expression of your feeling and your opinion,” Clark said. “The key is that you want to simultaneously be honest about your truth but not be seen to be picking on your boss.”

Consider the nuclear option. Quitting might be your best move “if you feel that they have demonstrated that their values are completely out of alignment with yours, or that their brand is so toxic that a lingering association would really cripple your reputation going forward, or perhaps … you have decided that your efforts to make change on the inside are no longer effective,” Clark said. Leave “the minute you understand that the leadership you are subjected to is harmful or scary or chaotic or unstable,” writer and career coach Kathy Caprino said. “The minute you assess that the ship is going down … you need to be finding something else.”