Rewrite metadata