diff --git a/dev/demo/menudemo.js b/dev/demo/menudemo.js
index 244aff4..c00f01e 100644
--- a/dev/demo/menudemo.js
+++ b/dev/demo/menudemo.js
@@ -4,12 +4,15 @@
 
 require(['menu','menu/item', 'menu/prefix', 'menu/lengthField'], function (menuClass, itemClass, prefixClass, lengthFieldClass) {
 
+  /**
+   * Create own menu item class.
+   */
   var OwnMenuItemClass = {
-
     create : function (params) {
       return Object.create(itemClass).upgradeTo(this)._init(params);
     },
 
+    // content function
     content : function (content) {
       if (arguments.length === 1) {
         this._content = content;
@@ -26,6 +29,8 @@
     further : function () {
       console.log("Further: " + this._name);
     },
+
+    // initialize item
     _init : function (params) {
       if (params[0] === undefined)
 	throw new Error("Missing parameters");
@@ -33,11 +38,13 @@
       this._name = params[0];
       this._content = document.createTextNode(this._name);
       this._lcField = ' ' + this.content().textContent.toLowerCase();
-      
       return this;
     }
   };
 
+  /**
+   * Create own prefix class.
+   */
   var OwnPrefixClass = {
     create : function () {
       return Object.create(prefixClass)
@@ -49,6 +56,9 @@
     }
   };
 
+  /**
+   * Create own menu class.
+   */
   var OwnMenu = {
     create : function (params) {
       var obj = Object.create(menuClass)
@@ -74,7 +84,6 @@
 
   document.getElementById('menu').appendChild(menu.element());
 
-  menu.limit(3);
-  menu.show(0); // Make this a 3
+  menu.limit(3).show(3);
   menu.focus();
 });
diff --git a/dev/js/spec/menuSpec.js b/dev/js/spec/menuSpec.js
index f993d33..e19122a 100644
--- a/dev/js/spec/menuSpec.js
+++ b/dev/js/spec/menuSpec.js
@@ -1327,7 +1327,7 @@
       expect(menu.shownItem(2).lcField()).toEqual(' veröffentlichungsdatum');
     });
 
-    it('should scroll to a chosen value', function () {
+    it('should scroll to a chosen value (1)', function () {
       var menu = KorAP.OwnMenu.create(demolist);
       menu.limit(3);
 
@@ -1348,16 +1348,23 @@
       expect(menu.shownItem(1).active()).toBe(false);
       expect(menu.shownItem(2).active()).toBe(true);
       expect(menu.shownItem(3)).toBe(undefined);
-
     });
 
-    xit('should highlight a chosen value');
-    xit('should move the viewport to active, if active is not in the viewport');
+    it('should scroll to a chosen value (2)', function () {
+      var menu = KorAP.OwnMenu.create(demolonglist);
+
+      // Choose value 3
+      expect(menu.limit(3).show(3)).toBe(true);
+      expect(menu.shownItem(0).lcField()).toEqual(' länge');
+      expect(menu.shownItem(0).active()).toBe(true);
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(2).active()).toBe(false);
+      expect(menu.shownItem(3)).toBe(undefined);
+    });
+
+    xit('should scroll to a chosen value after prefixing, if the chosen value is live');
   });
 
-
-
-
   describe('KorAP.Prefix', function () {
     it('should be initializable', function () {
       var p = prefixClass.create();
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index 2cd99d6..69107d0 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -7,6 +7,7 @@
  * TODO: space is not a valid prefix!
  * TODO: Show the slider briefly on move (whenever screen is called).
  * TODO: Ignore alt+ and strg+ key strokes.
+ * TODO: Should scroll to a chosen value after prefixing, if the chosen value is live
  */
 define([
   'menu/item',
@@ -409,7 +410,8 @@
 	  active = this.liveLength() - 1;
 	};
 
-	if (active > this._limit) {
+	// Item is outside the first viewport
+	if (active >= this._limit) {
 	  offset = active;
 	  if (offset > (this.liveLength() - this._limit)) {
 	      offset = this.liveLength() - this._limit;
