thank you for posting. I see you solved problem by complicated way that I wanted to do. In your case it is right decision, because your program is much more complicated and you manage circuit/streams more complex. I tried to do is simply, but it probably dont work :-).
So I used "your" style of handling streams. It is a little bit complicated, but works.
Thank you, Marek
PS: By the way - you problably dislike comments in source codes, do you? ;-)