Fix error where window.getComputedStyle returns null