 
             if (_pts_analyzing == false) {
                 if (last_seqnum == _levels[level].end_seqnum) {
-                    // if last segment was last fragment of VOD playlist, notify last fragment loaded event, and return
+                    // if last segment of level already loaded, return
                     if (_hls.type == HLSTypes.VOD) {
-                        _hls.dispatchEvent(new HLSEvent(HLSEvent.LAST_VOD_FRAGMENT_LOADED));
-                        // stop loading timer as well, as no other fragments can be loaded
-                        _timer.stop();
-                    }
-                    return LOADING_WAITING_LEVEL_UPDATE;
+                        // if VOD playlist, loading is completed
+                        return LOADING_COMPLETED;
+                    } else {
+                        // if live playlist, loading is pending on manifest update
+                        return LOADING_WAITING_LEVEL_UPDATE;
+                    }
                 } else {
                     // if previous segment is not the last one, increment it to get new seqnum
                     new_seqnum = last_seqnum + 1;

                            _loading_state = _loadnextfragment(_level, _frag_previous);
                        }
                    }
                    if (_loading_state == LOADING_STALLED) {
                        /* next consecutive fragment not found:
                        it could happen on live playlist :
                        - if bandwidth available is lower than lowest quality needed bandwidth 
                        - after long pause */
                        CONFIG::LOGGING {
                            Log.warn("loading stalled: restart playback");
                        }
                        /* seek to force a restart of the playback session  */
                        seek(-1);
                        return;
                    }
                    break;
                // if key loading failed
                case  LOADING_KEY_IO_ERROR:

                        calling _loadfragment will also reload key */
                        _loadfragment(_frag_current);
                        _loading_state = LOADING_IN_PROGRESS;
                    }
                    break;
                case LOADING_COMPLETED:
                    _hls.dispatchEvent(new HLSEvent(HLSEvent.LAST_VOD_FRAGMENT_LOADED));
                    // stop loading timer as well, as no other fragments can be loaded
                    _timer.stop();
                    break;
                default:
                    CONFIG::LOGGING {
                        Log.error("invalid loading state:" + _loading_state);
                    }
                    break;
            }
