New York CNN Business  — 

Supply chain issues, especially the computer chip shortage, took a major bite out of General Motors’ sales and earnings in the third quarter, but America’s largest automaker was still able to perform better than expected.

GM also gave investors a bullish outlook, saying that its full-year earnings should be at the upper end of the raised guidance range it presented at an investors day at the start of this month.

Overall it said that its adjusted net income, excluding special items, came in at $2.2 billion, down from $4.1 billion a year earlier. But that was nearly $1 billion better than analysts surveyed by Refinitiv had forecast.

Revenue plunged nearly 25% to $26.8 billion, despite record high car prices caused by the limited supply of cars for sale. The number of cars GM sold worldwide tumbled 27%. US sales fell even more, down a third from a year earlier.

Supply chain problems have hit the auto industry hard for months, limiting production by causing temporary plant closings. Overall, US car sales were down about 13% in the quarter according to Cox Automotive.

“The quarter was challenging due to continuing semiconductor pressures. But it also includes very strong results,” said CEO Mary Barra in a letter to investors. “We now believe GM’s full-year results will approach the high end of our guidance.”

One thing helping results was a $1.9 billion settlement with LG to cover the cost of an expensive recall of its North American electric vehicle, the Chevrolet Bolt, which is at risk of fire due in the battery made by LG. Since the company had already taken charge for part of the recall cost in the second quarter and was prepared to take an additional charge related to the recall in the third quarter, the settlement with LG produced a net $700 million gain in the period.

But that gain was previously disclosed by GM and factored into estimates by analysts, so the company’s better-than- expected results were not due to that.

Despite beating earnings and the strong guidance, GM (GM) shares were lower in premarket trading,