fixing deep hash implementation