迷途知返

Idiom

 * 1) to become aware of one's errors and turn back from one's wrong path; to realize one's mistakes and correct oneself