fix  bug when SSL is not enabled