see the error of one's ways

Verb

 * 1) To understand the reasons for which one's prior conduct was wrong or mistaken.