Fixed problem with document.querySelector