LDAP connection bugfix