Fix more bugs in list searching functions