Just when the Braves thought they had orchestrated a fairly textbook come-from-behind victory on the Marlins Monday night, shaky defense and some bullpen questions made it anything but.

Homers continue to cure the Braves ills, though, and they got what they were after. Evan Gattis launched a two-run shot to lift the Braves to a 4-2 10-inning win with his first ever walk-off home run.

The Braves had survived errors in the eighth and ninth innings – the first on an overturned replay call - and Craig Kimbrel’s first blown save of the year.

The Braves moved to 12-1 this season when they homer in a game. For Gattis, the two-run shot cured the ills he felt after his catcher’s inference call contributed to a wild ninth inning.

“Yeah I was mad because I just don’t like the rule,” Gattis said of nicking Adeiny Hechavarria’s bat as he swung and missed. “Do you really think if somebody’s that late, they’re going to put it in play? It should be a foul tip, but whatever. I made an adjustment, scooted back. I think it happened again (actually).”

Homeplate umpire Jim Joyce didn’t notice and Gattis was soon-to-be drawing more attention with his bat anyway. He punished a 1-0 fastball from Arquimedes Caminero after Dan Uggla led off the 10th with a single.

For all his heroics as a rookie, Gattis had never hit a walkoff homer. He tied a game last May with a home run in the bottom of the ninth off the Twins Glen Perkins, but Freddie Freeman got the walkoff hit that day an inning later.

“When I was in the minor leagues I imagined myself jogging around the bases,” Gattis said. “Same big dumb animal, just running around the bases in the big leagues instead of the minors.”

The Braves left the bases loaded in both the seventh and ninth innings, the latter after the speedy Jordan Schafer had led off with a double.

Jason Heyward, who had given the Braves a 2-1 lead with a broken bat single in the seventh, failed to get a bunt down, popping out to the pitcher. Some wondered why a hitter with his capability was dropping a bunt down in the first place.

“I left it up to him,” Braves manager Fredi Gonzalez said. “Whatever he wanted to do, whatever he felt comfortable doing there. You don’t want to play extra-inning games and chances of scoring a run from third base is greater than from second base, especially with (Carlos) Marmol. Maybe you take one of his breaking pitches away or his split because he doesn’t want to bounce it.”

A costly error by Dan Uggla, ruled that way after umpires overturned a call at second base using video replay, set up a treacherous eighth inning. But Jordan Walden managed to get out of the bases loaded jam. After Gattis’ error in the ninth, Kimbrel couldn’t.

Kimbrel, who had walked the leadoff man, gave up a game-tying double to Derek Dietrich, blowing his first save and spoiling the chance at a win for Julio Teheran. He struck out the side to hold it there for the Braves offense.

Kimbrel was trying to convert his first save in nine days after missing time with shoulder soreness, then got taken out of Saturday night’s game in New York after allowing two runs on 24 pitches. He said it played no factor Monday.

“I felt great,” Kimbrel said. “Better than I had before my rest, so that’s a good sign.”