Update to work with ssl