                         /* in case IO Error has been raised, stick to same level */
                         level = _level;
                         /* in case last fragment was loaded for PTS analysis, stick to same level */
-                    } else if (_pts_just_loaded == true) {
-                        _pts_just_loaded = false;
+                    } else if (_pts_just_analyzed == true) {
+                        _pts_just_analyzed = false;
                         level = _level;
                         /* in case we are switching levels (waiting for playlist to reload) or seeking , stick to same level */
                     } else if (_switchlevel == true) {

                        }
                    }

                    if (_pts_loading_in_progress == true) {
                        _pts_loading_in_progress = false;
                        _levels[_level].updateFragment(_frag_current.seqnum, true, fragData.pts_min, fragData.pts_min + _frag_current.duration * 1000);
                        /* in case we are probing PTS, retrieve PTS info and synchronize playlist PTS / sequence number */
                        CONFIG::LOGGING {

        /* variable to deal with IO Error retry */
        private var _bIOError : Boolean;
        private var _nIOErrorDate : Number = 0;
        /** boolean to track whether PTS analysis is ongoing or not */
        private var _pts_analyzing : Boolean = false;
        /** boolean to indicate that PTS has just been analyzed */
        private var _pts_just_analyzed : Boolean = false;
        /** Timer used to monitor/schedule fragment download. **/
        private var _timer : Timer;
        /** requested seek position **/
