Fix behaviour on tree click