fixes for ssl support