Fix @md_id invalidating