fix binsearch_recur bug