Shows like Silicon Valley, Suits and The Office wouldn’t crack us up as much if there wasn’t a familiar grain of truth in each episode. While many of us pride ourselves in being coolly logical, it’s hard to escape the fact that we human beings are emotional creatures. Whether we’re at work or not, our feelings drive much of what we do.

No matter how much you’ve touted the company’s core values and the culture you want to build, chances are that interactions between the people who work for you will get messy from time to time—or that someone may step seriously out of bounds. And like it or not, as the business owner, you’re ultimately the one who is responsible for keeping the emotional temperature in the office to a comfortable level for all.

So how do you manage all of the personalities around you without losing focus on what you’re really there to do—grow a business? Here are some strategies to use.

Model the behavior you want to see.

No matter how small your company, you’re the public face of the business. As the leader, how you express your emotions day to day will set the tone for the entire organization. If you’re usually upbeat and positive, you’ll bring an emotional energy to the group that others will mirror.

You don’t have to adopt a guarded, “corporate” personality to do this but it is important to train yourself to think before you speak, choose your words carefully and consider your tone. What you say to your team has a tremendous impact on everyone who works for you.

Put it in writing.

Before any problems take place, considering hiring a consultant to draft a simple code of conduct that makes clear what type of behavior is acceptable at your business and what the consequences will be if someone violates it. Your consultant can advise you on how best to distribute it, so everyone is aware of the rules. As your business grows, you may also want to offer training on subjects such as avoiding sexual harassment or other areas where there are frequent misunderstandings.

Turn the pressure down.

Employees will be less likely to overreact to the normal frustrations of the workplace if they are putting in reasonable and predictable hours. While there may be some periods during the year when you’re all under the gun, you can prevent too much pressure from getting to your team by making an effort to keep their schedules consistent. Planning allows your team to coordinate outside responsibilities like childcare—giving them adequate time to recharge after work, socialize and stay fit.

If you’re in a crunch that will last more than a couple of days, consider bringing in temps or contractors to alleviate some of the burden. Even if you’re paying your people overtime, they aren’t likely to bring their best selves to work if they are working to exhaustion for weeks on end. In the end, it’ll probably save you money on overtime, anyhow.

Step away from your computer.

Set aside 30-60 minutes a day for “management by walking around”—in which you stop by team members’ work stations and ask—“What’s on your mind?” The more you keep the lines of communication open, the more likely you’ll be able to find out about any problems that are simmering before they reach crisis proportions.

Train employees to solve problems themselves.

Taking time to chat with employees doesn’t mean you have to listen to rambling complaints or negative comments about their colleagues. If someone has a minor problem with the guy or gal in the next cubicle, offer coaching on how they might solve it without directly intervening. The time you take to mentor less experienced employees on how to develop “soft skills” like conflict resolution will pay off in a more harmonious culture.

Know when to intervene.

There are times when, as a business owner, you can’t simply ask employees to work things out. If someone’s behavior impinges on the rights, safety or security of anyone on your team, you may have to intervene immediately. Behavior that’s out-of-bounds can hurt your culture and potentially lead to lawsuits—or even violence.

Unfortunately, such behavior is more common than many of us are aware. Nearly one-fifth of workers say they face a hostile or threatening environment at work, according to a recent survey by the Rand Corp., Harvard Medical School and the University of California at Los Angeles. With the past month, 12.8% of respondents said they had experienced verbal abuse or threats, 9% reported experiencing humiliating behavior, 2.7% said they had been the target of unwanted sexual attention, and 1.6% said they had been subject to physical violence.

None of these types of behaviors should be ignored. If you are getting complaints that someone is creating a hostile or threatening environment for others, take it seriously and get legal advice immediately. Also know what you would do if, for instance, a disgruntled former employee came into your workplace and started threatening people.

In most cases, you’ll never have to deal with a situation like this. But once you’re prepared, you’ll be able to come into work every day knowing that you can handle virtually any situation that comes along.