score calculation fix