fixed IP address detection bug