fix #5 selecting last item in the list as closest