Update shared/stream.cpp