fixed one bugs in the scoring algorithm