Fix failing tests
Add TLS check issue #24
Merge pull request #25 from Andersos/master

Add TLS option