Fixed pointer problem in ldap lookup.