Fixed bernoulli likelihood divide by 0 and log of 0