Deselect nodes when removing them