@@ -181,8 +181,8 @@ function debugModule(module, runtime) {
181181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
182182 snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
183183
184− if (position > 0) {
185− var lastEventTime = recordedEvents[position-1].timestep;
184+ if (position < getRecordedEventsLength()) {
185+ var lastEventTime = recordedEvents[position].timestep;
186186 var scrubTime = runtime.timer.now() - lastEventTime;
187187 runtime.timer.addDelay(scrubTime);
188188 }
@@ -251,10 +251,6 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
251251 function continueProgram() {
252252 if (debugModule.getPaused())
253253 {
254− if (currentEventIndex === 0) {
255− restartProgram();
256− return;
257− }
258254 var closestSnapshotIndex =
259255 Math.floor(currentEventIndex / EVENTS_PER_SAVE) * EVENTS_PER_SAVE;
260256 resetProgram(currentEventIndex);