How I figured out why I was struggling as a manager, and what to do about it.