Many managers make the mistake of letting poor behavior get out of control before stepping in.
One of my maxims on management is: What you allow, you encourage.
When you see inappropriate behavior, address is immediately.
In this Q&A from the Fort Wayne (IN) Journal Gazette, a manager asks if she needs to address issues stemming from a direct report. "Even if she bugs me, do I need to talk to her?"
The answer, from Daneen Skube, is correct of course: "Yes, you do."
A better question, from my perspective, is - "Why did you wait so long to do it?"
Good managers - like good parents - address bad behavior immediately. It may seem easier to avoid a potential confrontation, but once the issue exacerbates, it's must more difficult to correct it.