fix a bug for binary search for specified ip address.