fix hash sort exception