Modification for getting ldap working