tree view , graph view

fix tree view and graph view bugs.