Fix adding duplicate metrics