NEW YORK (AP) — U.S. stock indexes struggled to find direction Wednesday, ending the choppy day of trading with a loss for the second straight day.

The latest market decline was modest compared with the previous day’s steep drop, but both were largely driven by a sell-off in technology stocks. Losses in Amazon, Netflix and other consumer-focused companies also weighed on the market Wednesday. Energy stocks fell in tandem with crude oil prices.

Those losses outweighed gains by drugstore chains, health care companies and other stocks.

Despite a crop of strong company earnings and market-boosting corporate deal news, traders continued to wrestle with the potential implications of negative headlines swirling around several big-name stocks, including Amazon, Facebook and Tesla.

“The news continues to be volatile and the markets are just highly sensitive to it in a way that they weren’t sensitive to it last year,” said Tom Martin, senior portfolio manager with Globalt Investments. “We’ve forgotten that this is more like the way things are, that markets do react to news that comes in.”

The benchmark S&P 500 index lost 7.62 points, or 0.3 percent, at 2,605. The Dow Jones industrial average fell 9.29 points, or 0.04 percent, to 23,848.42. The Nasdaq composite slid 59.58 points, or 0.8 percent, to 6,949.23. The Russell 2000 index of smaller-company stocks lost 0.54 points, or 0.04 percent, to 1,513.03. More stocks rose than fell on the New York Stock Exchange.

Bond prices were little changed. The yield on the 10-year Treasury held at 2.78 percent.

The major stock indexes wobbled between gains and losses for much of the day as investors weighed the latest developments with some of the market’s biggest names.

Facebook, which has taken a beating in recent days over privacy concerns, reflected the broader movement of the market, dipping into the red at times before eking out a small gain. The social media giant said early Wednesday it would give its privacy tools a makeover. The move is a response to criticisms over its data practices and the prospect of tighter European regulations in the coming months. The stock gained 81 cents, or 0.5 percent, to $153.03.

“Tech has had such a tremendous run-up and has outperformed some of the other sectors,” said Erik Davidson, chief investment officer for Wells Fargo Private Bank. “There may be other areas now that are more attractive, and we’ve seen some strength recently in some of the more defensive-oriented sectors.”

Investors also fretted about Amazon after Axios, citing anonymous sources, reported Wednesday that President Donald Trump has wondered aloud if there was a way to “go after” Amazon with antitrust or competition law.

Amazon has long been a target of Trump, who has tweeted in the past that the online retailer didn’t pay enough taxes or needed to pay the U.S. post office more for handling shipments. Amazon CEO Jeff Bezos also personally owns The Washington Post, which Trump has labeled “fake news” when unfavorable stories are written about him or his administration. Shares in the e-commerce giant fell $65.63, or 4.4 percent, to $1,431.42.

Netflix also declined, shedding $14.92, or 5 percent, to $285.77.

Tesla tumbled 7.7 percent after Moody’s downgraded the electric car maker’s credit rating. The move piles more pain on Tesla, whose stock has been pummeled by news that authorities will investigate a fatal crash that involved a Tesla electric SUV equipped with a semi-autonomous control system. The stock lost $21.40 to $257.78.

Walgreens gained 2.5 percent after the largest U.S. drugstore chain reported quarterly earnings and revenue that came in ahead of analysts’ forecasts. The stock rose $1.63 to $67.59. Investors also bid up shares in CVS Health, which climbed $2.11, or 3.5 percent, to $62.71.

Lululemon jumped 9.2 percent after the seller of premium yoga wear reported strong results for its fourth quarter and also released an upbeat outlook. The stock gained $7.25 to $85.96. Shares in RH vaulted 22.5 percent after the home furnishings retailer reported earnings that easily beat analysts’ forecasts. The stock rose $16.93 to $92.24.

Irish drugmaker Shire Plc jumped 12.2 percent after Japanese rival Takeda said it’s considering a takeover offer. Takeda said that buying Shire would enhance its R&D and its reach into the U.S. Shire’s U.S.-listed shares climbed $15.66 to $144.53.

Benchmark U.S. crude lost 87 cents, or 1.3 percent, to settle at $64.38 per barrel on the New York Mercantile Exchange. Brent crude, used to price international oils, fell 58 cents, or 0.8 percent, to $69.53 per barrel in London.

The slide in oil prices weighed on energy sector stocks. Occidental Petroleum gave up $2.67, or 4.1 percent, to $63.15.