Invalid URL generation on custom SSL port