Fixed bug in estimation of KL divergence