fix crash for proxy without port