Fixes to SSL proxy