Added device width check