Fixed a bug with starting and stopping streams multiple times.