diff --git a/public/js/spec/menuSpec.js b/public/js/spec/menuSpec.js
index fef6027..a818574 100644
--- a/public/js/spec/menuSpec.js
+++ b/public/js/spec/menuSpec.js
@@ -928,13 +928,14 @@
     expect(menu.shownItem(0).name()).toEqual("Titel");
     expect(menu.element().childNodes[1].innerHTML).toEqual("<strong>Tit<mark>el</mark></strong>");
     expect(menu.shownItem(0).active()).toBe(false);
+
     expect(menu.shownItem(1).name()).toEqual("Untertitel");
     expect(menu.element().childNodes[2].innerHTML).toEqual("<strong>Untertit<mark>el</mark></strong>");
     expect(menu.shownItem(1).active()).toBe(true);
     expect(menu.shownItem(2)).toBe(undefined);
   });
 
-  xit('should be navigatable with a prefix (2)', function () {
+  it('should be navigatable with a prefix (2)', function () {
     var menu = KorAP.HintMenu.create("cnx/", demolist);
     menu.limit(3);
     expect(menu.show()).toBe(true);
@@ -942,6 +943,7 @@
     menu.prefix('el');
     expect(menu.show()).toBe(true);
 
+
     expect(menu.prefix()).toEqual("el");
     expect(menu._prefix.active()).toEqual(false);
     expect(menu.shownItem(0).name()).toEqual("Titel");
@@ -955,16 +957,17 @@
     // Backward
     menu.prev();
     expect(menu._prefix.active()).toEqual(true);
+
     expect(menu.shownItem(0).name()).toEqual("Titel");
     expect(menu.element().childNodes[1].innerHTML).toEqual("<strong>Tit<mark>el</mark></strong>");
     expect(menu.shownItem(0).active()).toBe(false);
+
     expect(menu.shownItem(1).name()).toEqual("Untertitel");
     expect(menu.element().childNodes[2].innerHTML).toEqual("<strong>Untertit<mark>el</mark></strong>");
     expect(menu.shownItem(1).active()).toBe(false);
     expect(menu.shownItem(2)).toBe(undefined);
 
     // Backward
-/*
     menu.prev();
     expect(menu._prefix.active()).toEqual(false);
     expect(menu.shownItem(0).name()).toEqual("Titel");
@@ -974,7 +977,6 @@
     expect(menu.element().childNodes[2].innerHTML).toEqual("<strong>Untertit<mark>el</mark></strong>");
     expect(menu.shownItem(1).active()).toBe(true);
     expect(menu.shownItem(2)).toBe(undefined);
-*/
   });
 
   xit('should be page downable');
diff --git a/public/js/src/menu.js b/public/js/src/menu.js
index c5bd2f8..5e7537b 100644
--- a/public/js/src/menu.js
+++ b/public/js/src/menu.js
@@ -503,6 +503,7 @@
      * Make the previous item in the menu active
      */
     prev : function () {
+
       // No active element set
       if (this._position == -1)
 	return;
@@ -510,8 +511,11 @@
       var newItem;
 
       // Set new live item
-      var oldItem = this.liveItem(this._position--);
-      oldItem.active(false);
+      if (!this._prefix.active()) {
+	var oldItem = this.liveItem(this._position--);
+	oldItem.active(false);
+      };
+
       newItem = this.liveItem(this._position);
 
       // The previous element is undefined - roll to bottom
@@ -520,9 +524,14 @@
 	// Activate prefix
 	var prefix = this._prefix;
 	this._offset = this.liveLength() - this.limit();
+
+	// Normalize offset
+	this._offset = this._offset < 0 ? 0 : this._offset;
+
 	this._position = this.liveLength() - 1;
 
 	if (prefix.isSet() && !prefix.active()) {
+
 	  this._position++;
 	  prefix.active(true);
 	  return;
