fix trying to backtrace past a closed stream