fix scoring function minibug