Fixed issue with ssl, should now switch ports and https when using over ssl