Stocks notched modest gains on Wall Street Monday as another solid showing by big technology companies helped the market overcome a weak start.

The S&P 500 ended 0.4% higher after erasing an early loss of 1.2%. Airline stocks sank after famed investor Warren Buffett said he’d dumped all his shares in the four biggest U.S. carriers. Crude oil prices rose.

On Monday:

The S&P 500 index rose 12.03 points, or 0.4%, to 2,842.74.

The Dow Jones Industrial Average gained 26.07 points, or 0.1%, to 23,749.76.

The Nasdaq climbed 105.77 points, or 1.2%, to 8,710.71.

The Russell 2000 index of smaller company stocks picked up 3.49 points, or 0.3%, to 1,263.97.

For the year:

The S&P 500 is down 388.04 points, or 12%.

The Dow is down 4,788.68 points, or 16.8%.

The Nasdaq is down 261.89 points, or 2.9%

The Russell 2000 is down 404.50 points, or 24.2%.