The beloved New York Mets mascot found himself in trouble after an employee dressed up as the character stuck up his middle finger — or appeared to do so, since the character itself only has four fingers. The “bird” was caught on camera as Mr. Met was walking into a tunnel at Citi Field in Queens, N.Y.

The employee in question was not fired, management for the team announced Thursday, although he came perilously close to being let go, and the team said the individual would not be wearing the mascot costume again. The baseball team quickly took to social media to apologize.

See:Meteorologist handed a sweater on air to cover up after viewers complain

It’s all too easy to get “caught” on camera for something either at work or after work, and experts say people’s behaviors might change if they know they’re being watched, be it from a smartphone someone takes out, surveillance cameras or dash cams — especially if they know it may cost them their jobs.

“You shouldn’t be on your best behavior because you don’t want to get caught,” said Vicki Salemi, a career expert at Monster. “You should just be on your best behavior because that’s the right thing to do.” (Others, as comedienne Kathy Griffin found out this week after getting fired from her New Year’s Eve CNN hosting gig, welcome the camera.)

Why streaming won't kill the music industry

See also: This is the gadget that could one day replace your smartphone

There have been countless other situations in which individuals were fired for footage of them doing something inappropriate: a state park cashier was fired after she filmed a confrontation between her and a park manager over speeding; a babysitter was let go after a woman found a cellphone video showing gallons of water being dumped on her baby; and a teacher and a paraprofessional were fired after video showed them physically fighting in a classroom.

One high profile executive who wasn’t on his best behavior while being filmed is Travis Kalanick, chief executive officer of ride hailing app Uber, who apologized after being caught arguing with one of his drivers and slamming the door on the way out. And Tim Armstrong, the AOL chief executive officer, apologized after firing an employee he fired for filming a meeting.

Police have also been fired for inappropriate behavior filmed on smartphones, such as two Georgia cops who were fired after a cell phone video showed them punching and kicking a handcuffed motorist. And former FBI director James Comey said the “viral video effect,” where officers are wary of approaching people because they may end up on camera and all over social media, was the reason for a spike in violent crime around the country, because they’re avoiding these situations for fear of ending up on camera.

So how do you avoid becoming the subject of a viral video and potentially being fired as a result?

Take a deep breath and a moment to regroup — go to the restroom, sit in your car, take a short walk, Salemi said. “Do something to remove yourself,” she said.

Also, realize you always need to be aware, and if you make a mistake (as everyone does), you need to own up to it. Talk to your boss about the situation, apologize, say you learned from it and try not to let it happen again. “Turn it into a conversation,” Salemi said.