         /** has manifest just being reloaded **/
         private var _manifest_just_loaded : Boolean;
         /** last loaded level. **/
-        private var _last_loaded_level : int;
+        private var _level_last_loaded : int;
+        /** next level (-1 if not defined yet) **/
+        private var _level_next : int;
         /** Reference to the manifest levels. **/
         private var _levels : Vector.<Level>;
         /** Util for loading the fragment. **/

                        _switchlevel = true;

                        // check if we received playlist for choosen level. if live playlist, ensure that new playlist has been refreshed
                        if ((_levels[level].fragments.length == 0) || (_hls.type == HLSTypes.LIVE && _last_loaded_level != level)) {
                            // playlist not yet received
                            CONFIG::LOGGING {
                                Log.debug("_checkLoading : playlist not received for level:" + level);
                            }
                            _loading_state = LOADING_WAITING_LEVEL_UPDATE;
                        } else {
                            // just after seek, load first fragment
                            _loading_state = _loadfirstfragment(_seek_pos, level);

                            _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
                        if ((_levels[level].fragments.length == 0) || (_hls.type == HLSTypes.LIVE && _level_last_loaded != level)) {
                            // playlist not yet received
                            CONFIG::LOGGING {
                                Log.debug("_checkLoading : playlist not received for level:" + level);
                            }
                            _loading_state = LOADING_WAITING_LEVEL_UPDATE;
                            _level_next = level;
                        } else {
                            _loading_state = _loadnextfragment(level, _frag_previous);
                        }
