Ensure set_env value is always applied