fix issue with id collisions