mend one's ways

[mend one's ways] {v. phr.} To reform; change one's behavior fromnegative to positive.

He had better mend his ways or he'll wind upin jail.