Make SSL work correctly