Fixed issue when updating the selected items
Added some tests for multiselect mode