Fix a bug in the entropy estimator