Generate a random id on new elements