Fixed a bug when applying infoGain to test documents