fix duplicated ids