Added fallback if no port and ip provided