New Zealand coach Scott Robertson said his team needed to improve their discipline after being given a major scare by Scotland at Murrayfield on Saturday before claiming a 25-17 win over the hosts.
Replacement full-back Damian McKenzie inspired the All Blacks, scoring the points that broke the deadlock in the final seven minutes after Scotland had overcome a 17-0 halftime deficit to pull level in the second half.
Scotland's fight back came against an All Blacks side that received three yellow cards in 28 minutes as Leroy Carter, Ardie Savea and Wallace Sititi were all sin-binned before McKenzie scored a late try and penalty to secure the win.
"We got three yellow cards and there's something around self control, these little impulses and decisions we make that we've got to get better at," said Robertson.
"It's important to understand that test footie is tough.
"You're going to have adversity and we did and we're really pleased, especially with the guys who came off the bench to perform really well."
New Zealand had powered into an early lead with Cam Roigard crossing to score a second minute try and Will Jordan added a second on the cusp of halftime, but it was his team's rearguard action when under pressure that impressed Robertson most.
"There was some amazing efforts on defence, so proud of that," he said. "We could've just rolled over and given up on one of the efforts but we didn't.
"We stayed in it for such long periods of time and when we needed to turn over (we did). That's the thing we're really proud of.
"It wasn't perfect execution, we could've put them away and it could've been 30 points but we won tough and that's what we're proud of. This stuff's important to us.
"When we had the ball we looked good, we just wanted to get the ball back. We started with line-outs and then momentum came back our way. That's what got us home."

India win Australia series after fifth T20 is washed out in Brisbane
Norris on pole for Sao Paulo sprint, Piastri third
Sabalenka books WTA Finals title clash with Rybakina
Thrilling start to Dubai Racing Carnival
Aaron Rai, Tommy Fleetwood share halfway lead in Abu Dhabi