diff --git a/lib/utils.js b/lib/utils.js
index <HASH>..<HASH> 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -157,7 +157,7 @@ DomUtils.removeElement = function(elem){
 	if(elem.next) elem.next.prev = elem.prev;
 
 	if(elem.parent){
-		elem.parent.children.splice(elem.parent.children.indexOf(elem), 1);
+		elem.parent.children.splice(elem.parent.children.lastIndexOf(elem), 1);
 	}
 };
call Array#lastIndexOf in .removeElement

leads to a speedup in `cornet` and doesn't hurt performance elsewhere