bernoulli_check fix