ssl and port fixes