Correct a bug in func "score"