fix hash bugs