fix ldap bug