Tesla reported stronger-than-expected second quarter, with a record net income of $1.1 billion.

It was far more than double the $438 million it made in the first quarter, and more than 10 times the net income it reported a year ago. And it answered a major criticism of investors who’ve been bearish on the stock over the strength of Tesla’s results.

Notably, Tesla didn’t depend on selling regulatory credits to other automakers to achieve its blockbuster earnings. Those credits were responsible for just $354 million in revenue in the quarter. In previous quarters, even when Tesla reported positive adjusted earnings, its net income depended on selling credits to rivals that needed to buy them to meet tougher environmental standards. Critics have long attacked Tesla for that, saying the company wasn’t making money actually selling cars.

The company’s adjusted income, which is the measure more closely watched by investors, jumped to $1.6 billion, far better than the $1.1 billion forecast by analysts. It was also up from its previous record earnings on that basis of $1.1 billion in the first quarter. Revenue of $12 billion also easily topped forecasts of $11.3 billion.

In February, Tesla disclosed it used some of its cash on hand to purchase $1.5 billion in bitcoin. In April, it disclosed that it has sold some of those holdings and booked net income of $101 million from its crypto trading. The bitcoin transactions made some investors nervous, especially since the cryptocurrency has lost more than a third of its value since then. Some had expected the company could report a $75 million loss on its bitcoin trading in the quarter, said Dan Ives, tech investor for Wedbush Securities. But instead it reported only a $23 million loss.

“While supply chain issues remain, it appears to be moderating heading into the next six to nine months,” said Ives. He said the report should confirm those expecting Tesla to hit full-year sales of 900,000 vehicles, up from the 500,000 it sold in 2020. It sold 386,000 cars in the first half of this year, more than double what it sold in the first half last year.

“The automaker benefited from record sales and reduced internal costs to overcome rising material costs and a $23 million bitcoin ‘impairment,'” said Karl Brauer, executive analyst at iSeeCars.com. “Tesla’s numbers, beating estimates by a healthy margin, confirm strong global demand for EVs continues, enough to more than offset Tesla’s near-term challenges.”

Tesla shares have been battered this year as earlier earnings reports, while strong, had fallen short of Wall Street hopes. Shares of Tesla initially rose, then fell slightly in after-hours trading following the report, but ahead of conference call with executives.