fix bug after deselection immediately after selection in tree