Fixed bug in range_search_2d