Electric carmaker Tesla (TSLA) doubled its profits for the third quarter compared to last year, but still missed analyst expectations for revenue.

The company announced its Q3 earnings Wednesday after trading closed.

Tesla reported $3.33 billion in income, or $1.05 in earnings per share, beating the $0.99-per-share forecast. It reported $21.45 billion in revenue, falling short of the $21.96 billion expected.

The company posted 343,830 deliveries, a 42% increase from the previous year. The EV manufacturer also recently had a single-month record 83,135 vehicles produced at its China factory, which opened in 2019.

The earnings report comes amid a shaky few months for an auto industry hit with surging fuel prices, high interest rates and slowing demand. Tesla, meanwhile, has also struggled with shipping issues and losing its artificial intelligence leader Andrej Karpathy in July.

Tesla CEO Elon Musk, meanwhile, has gained attention for his on-off involvement in a $44 billion deal to purchase social media platform Twitter.

Musk said the company expects to fulfill orders for its electric truck, the Semi, this December.

Shares of Tesla closed Wednesday at $222.04, up $1.85, or 0.84%.