Update the findFirstItem() and findLastItem()