Tree view bug fix