fix duplicate ids