Array.from(document.getElementsByClassName(…))
querySelectorAll(…)
This should prevent a sync issue with updateDisplay not always being loaded on time.