Stream cleanup
Merge pull request #9749 from mmun/stream-cleanup

Stream cleanup