fixed ldap syntax errors and dn lookup in remove expired objects method