some fixes towards ssl