fixed dnode.encode, to be out of stack overflow