Some tweaks to getWordStat