Fix tree view empty parent node issue