style.display doesn't catch CSS changes