fix dummy node bug by using tree