Fix duplicate ids