diff --git a/web/debugger.js b/web/debugger.js
index aeb3ab4ce..0cfe26355 100644
--- a/web/debugger.js
+++ b/web/debugger.js
@@ -44,7 +44,7 @@ var FontInspector = (function FontInspectorClosure() {
     }
   }
   return {
-    // Poperties/functions needed by PDFBug.
+    // Properties/functions needed by PDFBug.
     id: 'FontInspector',
     name: 'Font Inspector',
     panel: null,
@@ -140,7 +140,7 @@ var StepperManager = (function StepperManagerClosure() {
   var stepperChooser = null;
   var breakPoints = {};
   return {
-    // Poperties/functions needed by PDFBug.
+    // Properties/functions needed by PDFBug.
     id: 'Stepper',
     name: 'Stepper',
     panel: null,
@@ -207,7 +207,7 @@ var StepperManager = (function StepperManagerClosure() {
 var Stepper = (function StepperClosure() {
   function Stepper(panel, pageIndex, initialBreakPoints) {
     this.panel = panel;
-    this.len;
+    this.len = 0;
     this.breakPoint = 0;
     this.nextBreakPoint = null;
     this.pageIndex = pageIndex;
@@ -236,6 +236,7 @@ var Stepper = (function StepperClosure() {
       headerRow.appendChild(c('th', 'fn'));
       headerRow.appendChild(c('th', 'args'));
 
+      var self = this;
       for (var i = 0; i < IRQueue.fnArray.length; i++) {
         var line = c('tr');
         line.className = 'line';
@@ -249,7 +250,6 @@ var Stepper = (function StepperClosure() {
         cbox.type = 'checkbox';
         cbox.className = 'points';
         cbox.checked = checked;
-        var self = this;
         cbox.onclick = (function(x) {
           return function() {
             if (this.checked)
@@ -298,7 +298,7 @@ var Stepper = (function StepperClosure() {
             callback();
             break;
         }
-      }
+      };
       dom.addEventListener('keydown', listener, false);
       self.goTo(idx);
     },
@@ -331,7 +331,7 @@ var Stats = (function Stats() {
     return false;
   }
   return {
-    // Poperties/functions needed by PDFBug.
+    // Properties/functions needed by PDFBug.
     id: 'Stats',
     name: 'Stats',
     panel: null,
@@ -429,12 +429,12 @@ var PDFBug = (function PDFBugClosure() {
 
       // Initialize all the debugging tools.
       var tools = this.tools;
+      var self = this;
       for (var i = 0; i < tools.length; ++i) {
         var tool = tools[i];
         var panel = document.createElement('div');
         var panelButton = document.createElement('button');
         panelButton.textContent = tool.name;
-        var self = this;
         panelButton.addEventListener('click', (function(selected) {
           return function(event) {
             event.preventDefault();
diff --git a/web/viewer.js b/web/viewer.js
index 9b810b76f..1e6bf8a12 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -431,7 +431,7 @@ var PDFView = {
 //        }
 //      );
 //    },
-//    noData // Error ocurred try downloading with just the url.
+//    noData // Error occurred try downloading with just the url.
 //  );
 //#endif
   },
@@ -798,14 +798,14 @@ var PDFView = {
   search: function pdfViewStartSearch() {
     // Limit this function to run every <SEARCH_TIMEOUT>ms.
     var SEARCH_TIMEOUT = 250;
-    var lastSeach = this.lastSearch;
+    var lastSearch = this.lastSearch;
     var now = Date.now();
-    if (lastSeach && (now - lastSeach) < SEARCH_TIMEOUT) {
+    if (lastSearch && (now - lastSearch) < SEARCH_TIMEOUT) {
       if (!this.searchTimer) {
         this.searchTimer = setTimeout(function resumeSearch() {
             PDFView.search();
           },
-          SEARCH_TIMEOUT - (now - lastSeach)
+          SEARCH_TIMEOUT - (now - lastSearch)
         );
       }
       return;