issue #30; tls_get reimplemented