Fixing lost JS class on styling changes