Fixes incorrect stream usage.