fix assignment bug in stream helper
extend stream tests