Fix for BinarySearch