Fixing CSS JS media query detection