fix score calculation