fixed stream, added test
Merge pull request #1 from jarofghosts/master

fixed stream, added test