Fix bug in stream handling.
Version 0.1.3.