Fix error in media query parsing

There is a error in the media query grouping. The code was reseting the wrong variable. Now media queries will be group correctly.