who wrote when a man can't get a woman off his mind