Everyone loves a good party. But holiday gatherings, company picnics and other employee social gatherings aren’t always fun and games. In fact, they can be uncomfortable, socially awkward gatherings used to judge your ability to maintain professionalism in a social setting. When office parties get out of hand, it can lead to some professionally disastrous situations—even lawsuits.

How can you make sure you’re not ruining your professional image or risking your job when attending a work social event?

Here’s a look at some of the worst missteps people make at company parties, and how to avoid them:

5. Drinking too much. It’s not unusual for workplace events to come with complimentary cocktails or a keg of beer in the summertime. But it’s easy to overdo it when you’re trying to be casual and make small talk with coworkers. Imbibing too much alcohol can lead to embarrassing moments that haunt you for a very long time. An employee of NullMedia.com passed out drunk in a janitor’s closet in a hotel after a workplace holiday party. He was found the next morning by a co-worker who thought he was dead. “While the employee remained with the company for years afterward, the incident haunted him pretty much forever,” Christopher Null, the company’s owner, told CBS MoneyWatch. “Fortunately he was able to brush it off and treat it as the poorly thought-out mistake that it was.”

4. Getting in brawls with co-workers. You may harbor some resentment or animosity toward a colleague or manager, and there’s always the chance those feelings will bubble up and provoke anger at a social gathering. You might be tempted to say—or do—something you’ll regret later. One IT guy was promptly fired from his job after he drank so much that he got in a fist fight with his company’s chief financial officer at an office party. “When the cops came to calm him down, he fought them and got arrested,” one of his co-workers told Forbes. (Refer back to tip No. 1: The less you drink, the less likely you’ll make a fool of yourself.)

3. Getting injured in a storm. A gentle rain shower may be harmless, but if the weather turns severe during a picnic or other outdoor event, head indoors quickly—and don’t worry about salvaging the food or party games.  In 2013, 49-year-old Ronald Walsh of Dothan, Alabama was killed in a bad thunderstorm when he tried to secure an inflatable castle during a company picnic and something hit him in the head, according to The Dothan Eagle.

2. Flirting or making inappropriate overtures to co-workers.­  Sometimes work parties get too casual and certain people may cross the line or flirt with a colleague. Not cool—and something that may get you in serious trouble later on. An employee at an ad agency in Chicago recalls a senior-level manager getting drunk and “saying VERY sexually inappropriate things to basically every woman there,” according to Forbes. “He was fired the next day.” Remember that it’s a work-sponsored event and therefore workplace policies are enforced.

1. Badmouthing the boss. When socializing with your co-workers, the truth about how you feel about your manager or other colleagues may come out. Even if you don’t like someone else in the office, it’s best to keep those feelings under wraps at workplace social gatherings—because they could come back to bite you later on.

Office parties come with a host of potential employee mishaps. The best defense: Don’t overdo the liquor and remember you’re essentially at work.

Next Steps:  Imagine a world where your employees show up on time, work smart and deliver results for your small business day in and day out. Not there yet? Sign up for the weekly Small Biz Ahead Newsletter and we’ll send you the best science-backed strategies on managing productive, happy employees—including tips on how to get them to show up on time!