Changed how IP is determined