fix hash incorrect bugs