fix race while selecting a node in the menu