ssl improvements
small fixes