Fixed changing environment of ldap client