fix bugs in BuildWikipediaForwardIndex