fix hash conversion