clean up duplicates @id and id