More LDAP fixes