Removes removed item from selection, Fixed out of array bound bug

I have fixed an out of array bounds bug in _valueToSelection and also implemented a way to remove items in selection that are removed from the selector.