fix hash function error