Fixed infinite loop when the item isn't in the list.