Fixed a logic error in setting SSL or not.