Fix Stream class. Close #160