fixed binary search on linux