fix scores matrix ordering computation