document.getElementsByClassName polyfill bugfix