Fix edge case where infinite loop occured with a list of 3 and searching for an element not in list.