diff --git a/src/elements/a-gltf-entity.js b/src/elements/a-gltf-entity.js
index afc9522ad3c47eb29e6f4ef6b40b09e88505fd54..005713f93733b2480d52c8b7c8abfc609787b143 100644
--- a/src/elements/a-gltf-entity.js
+++ b/src/elements/a-gltf-entity.js
@@ -95,17 +95,17 @@ function attachTemplate(templateEl) {
   const templateRoot = clone.firstElementChild;
   const templateRootAttrs = templateRoot.attributes;
 
-  for (var i = 0; i < targetEls.length; i++) {
+  for (let i = 0; i < targetEls.length; i++) {
     const targetEl = targetEls[i];
 
     // Merge root element attributes with the target element
-    for (var i = 0; i < templateRootAttrs.length; i++) {
-      targetEl.setAttribute(templateRootAttrs[i].name, templateRootAttrs[i].value);
+    for (let j = 0; j < templateRootAttrs.length; j++) {
+      targetEl.setAttribute(templateRootAttrs[j].name, templateRootAttrs[j].value);
     }
 
     // Append all child elements
-    for (var i = 0; i < templateRoot.children.length; i++) {
-      targetEl.appendChild(document.importNode(templateRoot.children[i], true));
+    for (let j = 0; j < templateRoot.children.length; j++) {
+      targetEl.appendChild(document.importNode(templateRoot.children[j], true));
     }
   }
 }