Unless you have been living in a cave somewhere, you probably know that Uber has recently been buried in scandal. The CEO was put on leave of absence by the board, and the Senior Vice President for business was fired, and twenty employees were fired for sexual harassment.

An investigation by an outside law firm resulted in 47 recommendations about what Uber needs to change.

What can leaders learn from this HR horror? There are seven HR mistakes you need to know about now, to prevent them.

1. Make sure there are clear written rules and policies about inappropriate behavior.

When Uber had an all employee meeting in Las Vegas, there was excessive drinking, drug use and a manager groped several female employees. If you do not have clear policies, you will subject yourself to almost absolute liability.

2. Make sure there are swift consequences for bad behavior.

When a female engineer complained that her boss was sexually harassing her- the company did nothing. The reason? The manager was a “super performer.”

The only way she got results was to write a public blog- which became viral and led to an investigation. If you do not have written policies and enforcement when people violate them – then prepare for lawsuits.

3. Make sure you support HR.

At Uber, HR was not supported by senior management; in fact, they were ignored. If senior leadership does not support HR, then employees feel free to operate any way they want. You take the teeth out of HR’s ability to enforce any policy.

4. Make sure your company values aren’t vague or even worse- dangerous.

Uber had fourteen corporate values, and many of them sound more like the rules of a frat house than a company. Values like “always be hustlin’, and “toe stepping.” Another value is “super-pumpedness,” whatever that means.

The problem with the Uber values is they are very vague- employees can interpret them in any way they want. Another issue is that values like “toe stepping” encourage employees to misbehave. In short, values equal behavior.

5. Don’t treat people differently.

Uber offers a catered dinner for employees every night- but it was brought in at 8:15 PM. The late dinner was rewarding people who were single and punishing employees who had a family to go home to at night.

From a benefits perspective, try to make sure you are treating everyone equally.

6. Make sure people get trained on diversity and inclusion.

Reports from several sources say that an Uber company director shouted a homophobic slur at an employee.

If people exhibit bad behavior it is for of two reasons 1) they haven’t been taught to be sensitive to diversity and inclusion 2) there are no clear company guidelines about appropriate behavior relating to diversity and inclusion.

7. Don’t be an arrogant leader or an arrogant company.

As a result of its success, I think leaders at Uber got arrogant and thought they could get away with outrageous, arrogant behavior. They almost acted like rules did not apply to them.

There is a famous video on YouTube of the CEO of Uber getting into an argument with an Uber driver and get angry and cursing out the driver.

One fundamental concept of leadership is to never talk down to people, and know that your behavior is being observed by every employee. Yes, they are watching you, and you need to model what you would like them to do. It’s called leading by example.

The problem with Uber is the leadership team was leading by example, but being the wrong kinds of role models.

So if you want to protect your company, reduce liability and have a culture where employees feel good about work, make sure you heed the warning of the lessons from Uber’s HR disaster.

The opinions expressed here by Inc.com columnists are their own, not those of Inc.com.