added some fixes from ale for the ldap handler