Fixed uniqueness of metric ids