亡羊补牢

wáng yáng bǔ láo

lit. to mend the pen after sheep are lost (idiom)

fig. to act belatedly; better late than never; to lock the stable door after the horse has bolted

wáng

old variant of 亡[wang2]

yáng

sheep; goat

to repair

láo

firm