Use lbeta instead of log(beta)