Fixed errors in new binary search.