fixed problem with not unique IDs