Fixing some stream stuff