diff --git a/dev/js/spec/menuSpec.js b/dev/js/spec/menuSpec.js
index 8e6141a..502549f 100644
--- a/dev/js/spec/menuSpec.js
+++ b/dev/js/spec/menuSpec.js
@@ -1087,13 +1087,13 @@
       expect(menu.shownItem(0).lcField()).toEqual(' titel');
       expect(menu.shownItem(1).lcField()).toEqual(' untertitel');
 
-/*
       menu.screen(0);
       expect(menu.shownItem(0).active()).toBe(false);
       expect(menu.shownItem(1).active()).toBe(true);
       expect(menu.shownItem(2).active()).toBe(false);
       expect(menu.shownItem(3)).toBe(undefined);
-*/
+
+/*
 
 console.log('VVVVVVVVVVVVVVVVV');
       menu.screen(1);
@@ -1102,9 +1102,11 @@
       expect(menu.shownItem(2)).not.toBeUndefined();
       expect(menu.shownItem(3)).toBe(undefined);
 
+
+console.log(menu.element().innerHTML);
+console.log(menu.shownItem(0)._element.outerHTML);
+
       expect(menu.shownItem(0).active()).toBe(true);
-console.log('AAAAAAAAAAAAAAAAA');
-/*
       expect(menu.shownItem(1).active()).toBe(false);
       expect(menu.shownItem(2).active()).toBe(false);
 */
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index ce59f3c..cc75926 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -166,6 +166,7 @@
       if (this._offset === nr)
 	return;
 
+      this.delete();
       this._showItems(nr);
     },
 
@@ -328,6 +329,8 @@
 	return false;
 
       // show based on initial offset
+      this.unmark();
+      this.delete();
       this._showItems(0);
 
       // Set the first element to active
@@ -337,6 +340,7 @@
 	this.position = 0;
 	this._active = 0;
       }
+
       else {
 	this.position = -1;
       }
@@ -365,6 +369,7 @@
      */
     hide : function () {
       this.active = false;
+      this.unmark();
       this.delete();
       this._element.style.opacity = 0;
       this._prefix.clear();
@@ -458,8 +463,6 @@
     // Append Items that should be shown
     _showItems : function (off) {
 
-      this.delete();
-
       // Use list
       var shown = 0;
       var i;
@@ -472,14 +475,8 @@
 	var item = this.item(itemNr);
 	this._append(itemNr);
 
-	/*
-	this._items[this._list[i]].active();
-	console.dir([i, this._active]);
-	if (this._active === i) {
-console.log('True!')
-	  this._items[this._list[i]].active(true);
-	};
-	*/
+	if (i === this.position)
+	  item.active(true);
 
 	// this._offset))
 	if (shown >= (this.limit() + off))
@@ -506,12 +503,6 @@
       };
       */
 
-      for (var i in this._list) {
-	var item = this._items[this._list[i]];
-	item.lowlight();
-	item.active(false);	
-      };
-
       // Remove all children
       var children = this._element.childNodes;
       // Leave the prefix and lengthField
@@ -522,6 +513,14 @@
       };
     },
 
+    // Unmark all items
+    unmark : function () {
+      for (var i in this._list) {
+	var item = this._items[this._list[i]];
+	item.lowlight();
+	item.active(false);	
+      };
+    },
 
     // Append item to the shown list based on index
     _append : function (i) {
@@ -642,6 +641,8 @@
 	  this.position = 0;
 	  newItem = this.liveItem(0);
 	  this._active = 0;
+	  this.unmark();
+	  this.delete();
 	  this._showItems(0);
 	};
       }
@@ -734,6 +735,8 @@
 	}
 	else {
 	  newItem = this.liveItem(this.position);
+	  this.unmark();
+	  this.delete();
 	  this._showItems(this._offset);
 	};
       }
