fixed an error with the unique id generation