Chinese idiom · 成语
亡羊补牢
Meaning
Mending the pen after the sheep is lost; acting to prevent further loss.
Character by character
亡羊lost sheep
补牢mend pen
Origin and story
From Strategies of the Warring States. It's never too late to fix a mistake and prevent more damage.