bugfix SSL handling