cleanly closed ssl, fixed compiler warning