fix: binarySearch failures are not guaranteed to return -1