Fix bug when ssl is disabled