check duplicate id

for if .random fails