Fix Torch crash