Fix LDAP auth error #1337