hack to fix suspected root of stream writing crash