Fixed client trying to connect via TLS when not using TLS