US stocks have finished slightly higher as investors picked shares that pay big dividends, such as real estate and phone companies.
Energy companies fell with the price of oil, and health care stocks continued to slide.
Stocks hardly moved for most of the day. The top gains went to the biggest dividend-payers, which are seen as relatively safe investments.
The price of oil, which reached a 15-month high on Monday, inched lower for the second day in a row.
Meanwhile, health care stocks continued to lose ground after health insurer Humana said its bonus payments from Medicare could be reduced.
Investors opted for safety a day after some weak earnings reports sent stocks sharply lower.
"People were worried that we'd continue to see investors shy away from what might be an erratic earnings season," said Kate Warne, an investment strategist for Edward Jones. "It's good news that investors are a little more optimistic and looking forward."
The Dow Jones industrial average edged up 15.54 points, or 0.1%, to 18,144.20. The Standard & Poor's 500 index added 2.45 points, or 0.1%, to 2,139.18. The Nasdaq composite slipped 7.77 points, or 0.1%, to 5,239.02.
Investors bought big dividend-payers like real estate investment trusts and utilities. Those stocks are the worst performers on the market over the last three months. Early in the year those stocks soared as investors looked for safe picks while the market tumbled.
Real estate investment trust Crown Castle International added 2.45 US dollars, or 2.8%, to 91.45 US dollars, and American Tower picked up 2.4%. Verizon led phone companies higher with a gain of 0.8% to 50.30 US dollars.
Stanley Black & Decker agreed to buy the tools business of consumer products maker Newell Brands for 1.95 billion US dollars (£1.57 billion). The deal will give Stanley Black & Decker brands including Irwin and Lennox and will help Newell Brands simplify its business after its purchases of Jarden and Elmer's within the last year.
Health insurer Humana said its plans received lower ratings from the Centres for Medicare and Medicaid Services, and weaker ratings could reduce the bonus payments the company gets from the government.
Benchmark US crude oil slid 1.2% to close at 50.18 US dollars a barrel in New York. Brent crude, the international standard, fell 1.1% to close at 51.81 US dollars a barrel in London. That sent energy companies lower.