Media query device bug fixes