For Elon Musk, 2018 was not a great year. The tech entrepreneur was sued for libel after a Twitter rant, had a very public breakup with a B-list celebrity, and was filmed getting really, really stoned on Joe Rogan’s podcast. But with the new year upon us, the cofounder of SpaceX and Tesla finally got some good news: Tesla is now America’s top premium automotive company, according to the latest sales figures.

On Wednesday, the company announced that it delivered more than 90,000 vehicles in the last quarter of 2018, which was an eight percent increase from the third quarter. Tesla sold 10,000 more cars and SUVs than BMW in Q4 and had already outpaced Mercedes-Benz in Q3, according to Forbes. The Model 3, an all-electric coupe that can go from zero to 60 mph in 1.9 seconds, was Tesla’s best-selling vehicle with 63,150 vehicles sold. It was followed by 13,500 sales of the Model S and 14,050 Model X cars.

Tesla had been losing money for almost the duration of its existence. Musk said the company has been shedding “sometimes $100 million a week” in an interview with Lesley Stahl on 60 Minutes. The company was banking on the Model 3 to turn things around, but first it had to find a way to up its production. If the pressure was getting to Musk, he managed to turn things around when he created an ad hoc assembly line for in a tent in Tesla’s parking lot in just three weeks. That entrepreneurial “think on your feet” approach helped Tesla and its founder avert disaster.

Of course, Musk still faces an uphill battle with investors as he rolls into 2019. This week, Tesla’s stock plummeted yet again—this time because it tried to lower costs to consumers. The company cut the price of one of its EVs by $2,000 to compensate U.S. customers for a diminished federal tax credit—which was recently cut in half from $7,500 to $3,750. The move sent the stock into a downward spiral.

Even when he’s doing something right, Musk can’t seem to win. But given Tesla’s latest sales figures, he may yet get the last laugh.