Fix score query