added NaN test for lbeta