Polish the stream code thanks to Erik Meijer feedback :-)