add metadata repair method for inconsistent metadata entries