fix a bug in pTopicGivenTerm