Unprofessional behavior may not be illegal behavior. It is important to act professionally when possible, but everyone makes mistakes. An ill-advised joke, a slip of the tongue, and occasional mistakes do not necessarily create a hostile workplace. They can be remedied with retraining, mediation, or other action consistent with your company’s policies.
Consequences will depend on the severity of harassment or discrimination and should be applied equally across all employees in accordance with your written policies.