Fixing random generator when no probabilities are set