fix stream error