now treeview is saved when destroied