Don't crash when clicking on leaf nodes