Value(envvar,"","ENVIRONMENT") does not delete an environment variable but sets the environment variable's value to "". Use Value(envvar,.nil,"ENVIRONMENT") to delete an environment variable.