binsearch fix