fix bug in the factor estimator