Fixed a small bug in the streaming functions.