Fixed two bugs

fixed a bug in which an item being added to the list that wasn't
in the master list would crash the program

fixed a bug where performing a search in the browser while an
item was selected would cause a crash