Better device width detection