Updating how we set and restore ENV variables when runing commands