Streams now process buffered data before closing. Closes issue #41.