fixed some bugs in scoring formulas