fixes for SSL