prevent erasing the end iterator if the removed item is not selected.
Merge pull request #87 from learn-more/master

prevent erasing the end iterator if the removed item is not selected.