Fixed how global term freq is calculated.