fixed bug when tree view was not visible