Tesla delivered a record number of vehicles last quarter, but nevertheless continues to lose significant amounts of money.

In a quarterly earnings report released by the car manufacturer, it is revealed that it lost $408 million in the second quarter of the year. Even so, that’s an improvement from the $718 million loss it posted 12 months ago and was joined by revenue totaling $6.35 billion, a considerable 59 per cent increase over the previous year.

Tesla is spending a significant amount of cash on its global expansion, which includes an aggressive push into China and the construction of a factory in Shanghai. In addition, Tesla is pushing forward with the development of the Model Y before it reaches the hand of customers in late 2020. The electric carmaker is also working on its very first all-electric pickup truck.

Also Read: Tesla Drops Standard Range Model S And Model X From Lineup

While Tesla’s losses and revenues for the second quarter of this year were better than Q2 2018, they did fall short of some estimates, USA Today reports. According to analysts from S&P Global Market Intelligence, second quarter revenue was predicted to sit at $6.44 billion, while the company was expected to post a net loss of $298 million. As a consequence, after the release of its quarterly results share price fell by 11.1 per cent in after-hours trading.

Earlier this month, Tesla confirmed that it delivered a record 95,200 vehicles in the second quarter, a 134 per cent jump over the previous year. The Model 3 accounted for 72,531 units, 3 while sales of the Model S and Model X totaled 17,650, a 21 per cent decrease over the previous year.