fixes score calculation problem