Bugfixes for LDAP TLS