correct error in hash building