fix the bug of calculate score