Fixed an error with duplicate IDs