FIX: fix registration of metadata

fix a bug