                         _hls.level = bestlevel;
                         _loading_state = LOADING_IDLE;
                         _switchlevel = true;
+                        _demux = null;
                         _hls.dispatchEvent(new HLSEvent(HLSEvent.LEVEL_SWITCH, _hls.level));
                         return;
                     }

                        // notify in case level switch occurs
                        if (level != _hls.level) {
                            _switchlevel = true;
                            _hls.dispatchEvent(new HLSEvent(HLSEvent.LEVEL_SWITCH, level));
                        }
                        // check if we received playlist for choosen level. if live playlist, ensure that new playlist has been refreshed

                            level = _hls.manuallevel;
                        }
                        if (level != _hls.level) {
                            _demux = null;
                            _hls.dispatchEvent(new HLSEvent(HLSEvent.LEVEL_SWITCH, level));
                        }
                        _switchlevel = true;
