Fixed nullpointerexception in BuildingTree.