Fix a bug on the first call off the treeview.