The Montreal Canadiens took advantage of fortunate bounces to bounce back from a two-game losing streak.

Two of Montreal's goals went in off the stick of a Buffalo defender, including Paul Byron's winner at 3:15 of overtime, as the Canadiens defeated the Buffalo Sabres 3-2 on Wednesday night.

"For the longest time, our team had trouble scoring, getting prime chances, and that's kind of the luck of the game," Byron said. "Good things happen when you put pucks on the net and we had bodies going to the net and getting sticks on stuff."

Ben Scrivens made a season-high 41 saves for the Canadiens, who won despite being outshot 43-23.

"He was the reason why we ended up picking up the win," Canadiens coach Michel Therrien said. "He was really sharp."

Defencemen Andrei Markov and Greg Pateryn each had goals in the second period after Montreal fell behind 1-0 early.

Coming off a 4-1 loss to the Florida Panthers on Tuesday night, the Canadiens overcame a slow start to prevail in a physical game in which both teams combined for 100 penalty minutes.

"I like when games kind of get like that," Pateryn said. "It gets you more involved in the game and sometimes you can get under some people's skin out there."

Zach Bogosian and Marcus Foligno had goals for Buffalo and leading scorer Ryan O'Reilly had an assist in his first game back after missing 11 games with a broken right foot. Robin Lehner made 19 saves.

Lucky bounces

The Canadiens had yet to put a shot on goal in the overtime when Byron carried the puck up the left side and sent a cross-ice pass from the point to Torrey Mitchell that deflected off Bogosian's stick and past Lehner.

"It's a terrible bounce that goes right off my tape and in," Bogosian said.

Foligno's short-handed goal tied it at 2 with 8:04 left in the third period. Foligno came off the bench to chase down a long pass from David Legwand and sent a wrist shot from the slot between Scrivens' pads for his 10th goal of the season.

The Canadiens scored in the first and last minute of the second period to take a 2-1 lead.

Pateryn tied it 47 seconds into the second with his first NHL goal. Opening the period playing 4-on-4, Alex Galchenyuk sent a pass from the right side of the net to set up Pateryn's one-timer from the point.

"It's an awesome feeling that I can't really put into words," Pateryn said.

Markov scored on the power play with 2.7 seconds left in the second period following a skirmish in front of the Sabres' net that led to 10-minute misconduct penalties on Bogosian and Montreal's Michael McCarron and a minor roughing penalty on Lehner.

With O'Reilly serving the penalty, Tomas Plekanec fed Markov for a 50-foot slap shot that deflected off the stick of Buffalo's Brian Gionta into the net. It was Markov's fifth goal and Plekanec's 35th assist.

"We certainly let the game get away from us with our composure level," Sabres coach Dan Bylsma said. "It was a factor in the second period. It was a factor in the third period with us getting off to and being affected by the game and the referee."