Convert port to string to avoid Regexp error.