Fixed bug in stream remaining active after stop