Solve two partition bugs in tree view