Fixed tree view breaking on deletions.