On paper the last two races have been a huge success for Mercedes.

At two grands prix where its car struggled to perform, Lewis Hamilton came away with a victory and a second place finish. In doing so, he has extended his lead over title rival Seabastian Vettel from three points after the 13th round in Monza to 34 after round 15 in Malaysia. But Mercedes is not a team that's comfortable riding its luck, and the title situation would have looked very different had the results of the last two races run true to form.

"We take the points -- and Ferrari would have done the same -- but somebody else's misfortune or underperformance doesn't cheer me up at all," team boss Toto Wolff said in Malaysia on Sunday night. "We're looking at our own performance, our own level of performance, whether it was good enough or better than anybody else's. This is the underlying feeling that exists at the moment, how can we fix our issues? Benefiting from Ferrari's problems in the championship shouldn't hide that they have caught up a 30 second gap in this race."

Sutton Images

The lack of performance in Singapore was to be expected based on Ferrari's strengths at high-downforce track layouts this season and Mercedes' history of poor results at the street circuit, but Sepang was a shock. Two long straights and some high-speed corners made Sepang look like a Mercedes stomping ground ahead of the weekend, but it was Ferrari and Red Bull that emerged as the fastest cars in Sunday's race.

After passing Hamilton for the lead on lap three, eventual race winner Max Verstappen pulled away from the Mercedes at a rate of 0.7s per lap and at some points was a full second faster than the championship leader before he eased off to protect his car. Mercedes' pre-race simulations also anticipated the Ferrari to be between 0.8s and 1.0s per lap quicker, but that was harder to measure in reality as Vettel ran a reverse strategy from the back of the grid. Nevertheless, compared to other races where Mercedes has struggled this year, the gap to its rivals in Malaysia was huge -- not to mention a genuine surprise compared to the team's expectations ahead of the race weekend. So what went wrong?

Tyre troubles

Ferrari's double engine drama helped Mercedes finish the weekend with a podium appearance. Mark Sutton/Sutton Images

High ambient and track temperatures were a key factor in Mercedes' struggle in Malaysia. From Friday onwards both drivers were complaining of a lack of grip due to the surface of the tyre overheating, and the struggle was immediately visible in the lap times. Although the car was well balanced front to rear, its performance was locked in a downward spiral as the tyre overheated, lost grip, slid some more and overheated further.

The problem was worse on Valtteri Bottas' car which was running a new aero upgrade Hamilton had opted to remove after Friday practice. Combined with Bottas' driving style, which tends to demand more of the tyres, the loss in performance was dramatic.

"I was struggling more with the front end, which hadn't been really the case this year, but now in mid-corner it's difficult to get the car to turn and I'm overheating the tyres, here it was left front wheel tyre," a dejected Bottas said after the race. "Also, I've been sliding with all four wheels in the fast corners, running the new package. "For me, in the race, if I tried to go quicker I would slide more and then would struggle more with the tyre temperatures. So it was all about trying to manage the tyre temperatures, trying to keep them under control in the race -- it's definitively not nice."

Max Verstappen had little trouble catching and passing Lewis Hamilton early in the race. Sutton Images

The combination of the heat, the Malaysia track layout -- which Wolff rated as the most ill-suited to Mercedes' car after Monaco, Budapest and Singapore -- and underperforming updates made for a much more painful weekend for than the team had imagined. Hamilton was able to extract an impressive qualifying time from the car on Saturday, but that was partly thanks to the cooler temperatures at 18:00 when the session was coming to an end. Had Q3 taken place at 15:00 when the race started it's very unlikely he would have managed the same lap time.

"I think we have a capricious car that has a very narrow operating window with the tyres, when the tyres generate optimum grip," Wolff said. "Dipping in and out of the window is the fundamental story of 2017 for us. Driving style plays a role and Lewis was able to better adapt than Valtteri but changing driving style is not something that comes easy to anybody.

"There's more than one problem that comes together to cause a lack of performance. One of them is certainly very high ambient temperatures and another is specific circuit characteristics. There might be some more circuits before the end of the year where we need to understand.

"Actually I'm very much looking forward to [the next race in] Suzuka to see how the car behaves there because it should be completely different. But every time we put the car on a circuit and drive it, the more we learn. Hopefully we are not having more outliers of underperformance like this weekend."

Is a return to form just around the corner?

Lewis Hamilton was unable to convert pole position into the race win but extended his title lead to 34 points with second place. Clive Mason/Getty Images

A long debrief followed Sunday's race in which the team drilled down into the root causes of the issues. It should also be remembered that the W08 has won nine of this year's 15 rounds and only three races ago looked unbeatable in Monza, so it was a big swing in performance regardless of the track conditions. But while Hamilton wasn't willing to give a blow-by-blow account of what had been said in the engineering room, he emerged for his Sunday evening press conference in high spirits.

"Honestly, I feel positive," he said on Sunday evening. "The debrief was one of the best debriefs I've had, period. That's often the case because when you have a win there is a lot less to say and everyone is riding on positives and there is a lot less to talk about. When you have a difficult day and when the s--- really hits the fan, that's when you have more questions and there are more details to go into.

"Generally, coming away from it I'm happy with my qualifying and happy with what I was able to get out the car. But I'm also happy with the analysis we had and that the team is now really pumped up to analyse and see what we can rectify with the current package we have, and also what we are going to do with next year."

Getty Images

In the cooler climate of Japan the whole situation could look very different this weekend, but Hamilton is wary the problems could return two rounds later in Mexico City.

"I think Suzuka is a much cooler circuit generally and the corners are a little bit different to what we experienced here, and we'll be on a different aero package as well so we should be better there," he said. "But Mexico where it's full downforce will be a place of concern and we will probably struggle there, but there's not a massive amount of corners so maybe we will be OK. I think that's the only one - this one and Mexico - that has the high downforce and the others I'm hoping will be more similar to Spa and Silverstone. But it's difficult to say until we get there."

As for the championship situation after a weekend of Ferrari engine issues, Wolff remains wary that luck can swing both ways.

"I think we have built a points advantage to Ferrari in the last two races because of them shunting out in Singapore and Sebastian's engine problems yesterday in qualifying and Kimi's problems today in the race. Had they finished the races as they should have performed, we would have not increased our point advantage but we would have lost many points to them.

"So there's five more races to go, you can see how quickly it can swing. This is motor racing and what makes it exciting and it can go against anybody. So we are very well aware that we need to understand our performances, how we can extract the maximum out of this car and keep carrying the advantage until the end of the season."