Fixed first testing for window.getComputedStyle and then using getComputedStyle directly