fix node's tree null bugs