fix bugs. displayTree