Fix from_string when the port is not specified