some clean up to ssl