some fixes to tree view 

#3235 and #3236