Tesla Inc. stands to save millions from its cost-cutting efforts earlier in the year, and margins are “more solid than they appear,” analysts at Macquarie Research said in a note Tuesday.

Tesla TSLA, +5.04% shares were poised to extend gains for a second session, but are still reeling from a 14% drop a day after the Silicon Valley car maker reported a wider-than-expected quarterly loss and sales lagged behind.

Tesla also said last week its No. 2, Chief Technology Officer J.B. Straubel, was leaving, its the highest-profile executive departure.

Related: Tesla’s key executive departures, in one handy list

The Macquarie analysts, led by Maynard Um, kept the equivalent of buy on Tesla stock and a price target of $400, among the highest from Wall Street analysts polled by FactSet and a nearly 70% implied upside from Tuesday’s prices.

The benefits of Tesla’s ongoing cost-cutting measures “do not appear to be baked into (second-half 2019) forecasts,” they said.

The restructuring actions are likely to result in estimated cost savings of about $130 million for remainder of the year, the analyst said. Including restructuring charges incurred in the first half, they forecast Tesla’s operating expenses to be down about $66 million, they said.

See also:Elon Musk’s latest Tesla sales promises have analysts scratching their heads

Tesla’s second-quarter gross margins were hit by one-off items that are past the company and margins will improve in the second half, they said.

Moreover, “underlying gross margins more solid than they appear,” the analysts said, estimating that Model 3 second-quarter gross margins, around 18% to 19%, were “likely down only marginally” despite a $7,000 fall in the sedan’s average selling price, “attesting to the scale benefits Tesla can achieve.”

Read more:Tesla gets rid of cheaper Model S, Model X options