local $resurrecting so that it automatically gets reset afterwards