fix wrong ssl determination logic