fix bug for sample size computing