RemoveSelectedNodes bug fix