Tesla met a closely watched goal for production, however it fell short on deliveries during the second quarter.

Tesla shares were trading higher, up about 4 percent on the news.

The company said it produced 53,339 vehicles during the second quarter, an increase of 55 percent from the prior period. That included 28,578 Model 3 vehicles, and 24,761 Model S and X cars combined.

Deliveries totaled 40,740 vehicles, falling short of what some on Wall Street expected.

The announcement comes one day after CEO Elon Musk congratulated Tesla employees for hitting the company’s target of building 5,000 Model 3 vehicles in the final week of June. The company has been trying to exceed the 5,000-per-week production target for months but has faced many obstacles along the way.

Tesla said Monday it now expects to increase production to 6,000 Model 3s per week by late July.

For the quarter, Tesla delivered 18,440 Model 3 vehicles, well below what many on Wall Street estimated. The consensus, according to Goldman Sachs analyst David Tamberrino, was for the company to deliver as many as 28,000 Model 3 vehicles. Meanwhile, the company delivered 10,930 Model S and 11,370 Model X respectively.

While the second quarter delivery numbers will get a fair amount of attention on Wall Street, the story driving Tesla shares is Model 3 production, and whether the company can sustain a higher production rate for its newest model and power the company to become cash flow positive in the second half of this year.

Becoming cash flow positive is a critical step in Musk’s goal to make Tesla profitable. Since its IPO eight years ago, Tesla has posted just two profitable quarters.

The company also reaffirmed its earnings outlook for the third and fourth quarters “despite negative pressures from a weaker [U.S. dollar] and likely higher tariffs for vehicles imported into China as well as components procured from China.”