ProcessDocument function bug fix

Normfactor was being calculated before the HashMap Token was being
populated