US indexes end mostly higher even as tech swoons