fixed ID generation issues. Using nodeflake, retry if duplicate ID is generated.