fixed bug where output stream was not returned
v0.1.3