fix dirichlet distribution overflow errors.