Fixed bug causing error if entropy given zero counts.