Minor bug fix when selecting an item and app crashing