bug fixes and tree view