Fixed a bug of PMI calculation.