Added safety random if duplicate error