diff --git a/toc.js b/toc.js
index <HASH>..<HASH> 100644
--- a/toc.js
+++ b/toc.js
@@ -3,7 +3,7 @@ var TOCContainer =  require("./toc-container-control");
 var el = document.getElementsByClassName("on-this-page-container");
 
 if (el.length) {
-	new TOCContainer(el);
+	new TOCContainer(el.item(0));
 } else {
 	console.log("An element with class 'on-this-page-container' is required");
 }
Pass the first match an not the whole collection