fixed score calculation bug