Tesla’s second-quarter production was up compared to the first quarter of 2016, but thanks to vehicles still being in transit, actual deliveries were down.

All told, Tesla produced 18,345 vehicles in the second quarter, and delivered 14,370, with 9,745 of those being Model S and 4,625 being Model X.

SEE ALSO: False Alarm: Motor Trend Does Not Reveal the Apple Car

Tesla had set a production goal of 17,000 vehicles. It technically met that goal, but its deliveries fell short, as the company said 5,150 vehicles were still in transit at the end of the quarter. That didn’t stop Tesla from touting a 20-percent increase over quarter one, citing production rates of just under 2,000 vehicles per week.

SEE ALSO: Why Has Tesla Stock Gone Up So Fast?

Tesla said almost half of second-quarter production occurred during the final four weeks of the quarter. The company said in a press release that it expects to produce 2,200 vehicles a week in quarter three and 2,400 in quarter four, thus reaching a production number of around 50,000 vehicles for the second half of the quarter.

Tesla said the 5,150 vehicles still in transit was a higher number than unexpected, and the company had just over 2,000 vehicles still in transit at the end of quarter one.