diff --git a/dev/js/spec/menuSpec.js b/dev/js/spec/menuSpec.js
index 1825917..327dd6c 100644
--- a/dev/js/spec/menuSpec.js
+++ b/dev/js/spec/menuSpec.js
@@ -1172,6 +1172,41 @@
       expect(menu.shownItem(2).active()).toBe(false);
     });
 
+    it('should be page downable with prefix', function () {
+      var menu = KorAP.OwnMenu.create(demolonglist);
+      menu.limit(3);
+
+      expect(menu.prefix('e').show(0)).toBe(true);
+
+      expect(menu.shownItem(0).active()).toBe(true);
+      expect(menu.shownItem(0).lcField()).toEqual(' titel');
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(1).lcField()).toEqual(' untertitel');
+      expect(menu.shownItem(2).active()).toBe(false);
+      expect(menu.shownItem(2).lcField()).toEqual(' veröffentlichungsdatum');
+      expect(menu.shownItem(3)).toBe(undefined);
+
+      menu.pageDown();
+
+      expect(menu.shownItem(0).active()).toBe(false);
+      expect(menu.shownItem(0).lcField()).toEqual(' länge');
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(1).lcField()).toEqual(' genre');
+      expect(menu.shownItem(2).active()).toBe(false);
+      expect(menu.shownItem(2).lcField()).toEqual(' textid');
+
+      // Doesn't matter
+      menu.pageDown();
+
+      expect(menu.shownItem(0).active()).toBe(false);
+      expect(menu.shownItem(0).lcField()).toEqual(' länge');
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(1).lcField()).toEqual(' genre');
+      expect(menu.shownItem(2).active()).toBe(false);
+      expect(menu.shownItem(2).lcField()).toEqual(' textid');
+    });
+
+
     it('should be page upable', function () {
       var menu = KorAP.OwnMenu.create(demolonglist);
       menu.limit(3);
@@ -1208,6 +1243,41 @@
       expect(menu.shownItem(2).active()).toBe(false);
     });
 
+    it('should be page upable with prefix', function () {
+      var menu = KorAP.OwnMenu.create(demolonglist);
+      menu.limit(3);
+
+      // Choose the final value
+      expect(menu.prefix("e").show(1000)).toBe(true);
+
+      expect(menu.shownItem(0).active()).toBe(false);
+      expect(menu.shownItem(0).lcField()).toEqual(' länge');
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(1).lcField()).toEqual(' genre');
+      expect(menu.shownItem(2).active()).toBe(true);
+      expect(menu.shownItem(2).lcField()).toEqual(' textid');
+      expect(menu.shownItem(3)).toBe(undefined);
+
+      menu.pageUp();
+
+      expect(menu.shownItem(0).lcField()).toEqual(' titel');
+      expect(menu.shownItem(0).active()).toBe(false);
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(1).lcField()).toEqual(' untertitel');
+      expect(menu.shownItem(2).active()).toBe(false);
+      expect(menu.shownItem(2).lcField()).toEqual(' veröffentlichungsdatum');
+
+      // Doesn't matter
+      menu.pageUp();
+
+      expect(menu.shownItem(0).lcField()).toEqual(' titel');
+      expect(menu.shownItem(0).active()).toBe(false);
+      expect(menu.shownItem(1).active()).toBe(false);
+      expect(menu.shownItem(1).lcField()).toEqual(' untertitel');
+      expect(menu.shownItem(2).active()).toBe(false);
+      expect(menu.shownItem(2).lcField()).toEqual(' veröffentlichungsdatum');
+    });
+
     it('should scroll to a chosen value', function () {
       var menu = KorAP.OwnMenu.create(demolist);
       menu.limit(3);
@@ -1232,8 +1302,6 @@
 
     });
 
-    xit('should be page upable with prefix');
-    xit('should be page downable with prefix');
     xit('should highlight a chosen value');
     xit('should move the viewport to active, if active is not in the viewport');
   });
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index 602eb37..0b013b9 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -326,8 +326,8 @@
       if (nr < 0) {
 	nr = 0
       }
-      else if (nr > (this.length() - this.limit())) {
-	nr = (this.length() - this.limit());
+      else if (nr > (this.liveLength() - this.limit())) {
+	nr = (this.liveLength() - this.limit());
       };
 
       if (this._offset === nr)
@@ -411,11 +411,12 @@
     show : function (active) {
 
       // show menu based on initial offset
-      this._unmark();      // Unmark everything that was marked before
+      this._unmark();     // Unmark everything that was marked before
       this.unshow();      // Delete everything that is shown
 
       // Initialize the list
       if (!this._initList()) {
+
 	// The prefix is not active
 	this._prefix.active(true);
 
@@ -435,14 +436,14 @@
 	if (active < 0) {
 	  active = 0;
 	}
-	else if (active > this.length()) {
-	  active = this.length() - 1;
+	else if (active > this.liveLength()) {
+	  active = this.liveLength() - 1;
 	};
 
 	if (active > this._limit) {
 	  offset = active;
-	  if (offset > (this.length() - this._limit)) {
-	      offset = this.length() - this._limit;
+	  if (offset > (this.liveLength() - this._limit)) {
+	      offset = this.liveLength() - this._limit;
 	  };
 	};
 
