Fixed a small bug with invalid streams.