Being a leader is fun when you're explaining to employees, investors, or companies why your company had the most profitable year ever. It's not so much fun when you've racked up a loss, or you've made a bad hire, or you have to discipline an employee.

Moments like these separate real leaders from people who just look like leaders. How you respond when things go wrong will determine the success of your team, your company, and ultimately your own career, according to Ian Siegel, co-founder of ZipRecruiter, a five-year-old job site which has been used by more than 400,000 employers and more than 6 million job seekers so far. 

Over those five years, he's faced a few of those tough decisions himself, and he's shared his advice about how to make the right call. 

1. Follow the Bardolph rule. 

Bardolph is a character from Shakespeare who's friends with the young Henry V but who is also an incorrigible thief. When Bardolph is found looting after a battle, an offense punishable by hanging, Henry allows the sentence to be carried out. The message was clear: No one is above the law.

The Bardolph rule is important, Siegel says, because it tells your entire team that everyone will be treated the same. "About a year ago, I learned one of my executives was frequently keeping his team past 10 pm," Siegel says. Although the executive in question was a veteran leader who contributed hugely to the company, Siegel couldn't let this behavior go. So he had a "candid conversation" with that executive about how he was treating his team in front of the whole executive team. It was embarrassing for the exec who'd been keeping his staff late. But everyone else got to see that no exec, no matter how valued, would be allowed to overwork his staff.

2. Get rid of employees--no matter how effective--whose values don't match yours.

"Every team member can be categorized in two ways--whether they produce results, and how well they embody the values of the company," Siegel says. It's an easy decision to get rid of team members who fail at both, and nurture and promote those who succeed at both.

The tough decisions come up when an employee succeeds at one but fails at the other. When that happens, Siegel says, the best leaders prioritize values over skills. "Those who embody the company's values but haven't yet produced should be mentored extensively and given every chance to succeed," he says. "Those who produce results while compromising on values are cancerous cells that will multiply and grow if not treated aggressively."

Siegel learned this lesson when the company hired what he calls "a sales savant." "He was so individually successful that we wrote the sales training manual based on the techniques he developed," Siegel recalls. "Unfortunately, he was serially unhappy with 'something.' As an opinion leader, the negative tone he struck mattered."

Eventually, this sales rep was offered a higher salary elsewhere, and ZipRecruiter's execs made the tough decision to let him leave rather than get into a bidding war. What happened next came as a surprise. "The team he was on has become our most profitable," Siegel says. "They now have a palpable swagger. Operating in a positive environment unleashed something in them and it's a reminder to me as a leader to never let individual employees, no matter how valuable, bring down the people around them."

3. Admit your mistakes and discuss them openly.

A leader who does this can really set him or herself apart, Siegel says. "We set a plan early in 2015 that was too oriented toward short-term financial goals." When that plan proved a failure, Siegel called the whole company together, and also met with employees in small groups, to talk about how he'd made a mistake and how the company would measure itself on customer satisfaction instead.

4. Set clear objectives and talk about them in context. 

"Many managers think it is good practice to set annual or quarterly objectives and formally review each team member's performance on that same cycle," Siegel says. 

While that's OK, he says it's better to spend five minutes a day with team members one on one to talk about that day's important meeting or task and how it fits into the annual or quarterly goal. Then pick up the conversation for another five minutes at the end of the day to review how the meeting or task actually went, and how it affected that larger goal.

5. Rethink fairness.

Income inequality is a very real problem, and many people make good arguments that there shouldn't be the huge disparities there are in compensation. But a real leader takes the practical approach that will best benefit the company, Siegel says. 

"It is typical for managers at small businesses to think that paying your best employee a little bit more than your average employee is 'fair.'  But if you are good setting objectives and constantly measuring each team member against those objectives, you are likely to find that your best team member is worth 10 times or 100 times more than your average team member."

If the process you use to measure your employees is rigorous and fair, then rewarding these top performers in accordance with the value they add is also rigorous and fair, he says. It's also necessary. "In today's market, if you don't reward your best performers, someone else will."