Fixed binary_search