some ssl fixes etc