Fixed bug which caused crash on restarting streaming.