New York CNN Business  — 

In 2016, General Motors put down $500 million on Lyft. That paid off with a $300 million gain last quarter.

Lyft’s IPO in March helped GM offset slumping vehicle sales last quarter. Car sales were particularly weak in China, GM’s biggest market. The number of vehicles GM sold in China plunged 20% compared to a year earlier because of a slowdown in the Chinese economy and a drop in industrywide sales.

Sales in the United States fell 7% in the quarter. Overall revenue fell 3% last quarter.

That dragged the company’s operating profit from autos $500 million lower. But the lift from the revaluation of GM’s Lyft stock and its stake in European automaker Peugeot SA helped GM report a net profit increase.

GM said it still expects to hit its profit and cash flow targets for the full year.

GM’s (GM) stock fell nearly 3% on the report.