DENVER — Goals have been hard to come by for the Avalanche lately. But even more so for the opposition.

Colorado defeated the Montreal Canadiens 2-1 in overtime on Wednesday to finish a five-game homestand at Ball Arena with a 4-1-0 record. The Avs scored just 11 goals in those games but surrendered only eight — four of which came against the Buffalo Sabres in the one loss.

“We had a meeting about it,” forward Mikko Rantanen after scoring his 22nd of the season in overtime to seal the comeback victory. “That we need to be better in the defensive zone and shutting off the rush, not give up so many chances. Today and last game against the Islanders, we did a really good job of not giving up a lot.”

The Avalanche outshot the opposition 178-121 during the homestand — an average of 35-24 each game. They gave up just eight shots to the Habs in the final two periods and overtime while peppering goaltender Jake Allen with 24.

“We came off of that slump and we came home and did a bunch of video work and then went to work on our D zone coverage,” head coach Jared Bednar said. “The rest is all just video work and buy-in and commitment from our guys.”

Listen to “Defense First” on Spreaker.

Trailing 1-0 for most of the night, the Avs needed more than 42 minutes to finally end Allen’s shutout big. And it came from his former teammate, Artturi Lehkonen.

Lehkonen scored on the 29th shot Allen faced. He lined up between the hash marks on the power play and collected a pass from Rantanen, firing it past the goalie to tie it up at 1-1. His eighth of the season was also his first against his former team in his first game against the Habs since last season’s trade deadline deal. The Avs had been held without a goal in 75 shots over the past two games before Lehkonen’s tally against his former team.

“Sometimes it’s just the way it goes,” Bednar said. “I liked the chances we were generating.”

Denis Malgin had a solid showing in his Avalanche debut. The 25-year-old took part in the optional morning skate before being inserted into the lineup following Monday’s trade from the Toronto Maple Leafs. Unlike most of the call-ups Colorado has needed to make throughout the season, Malgin seemed to be a better fit for Bednar’s system. At least that’s how it feels given his ice time in his debut.

Malgin skated on the left wing of Colorado’s third line with Logan O’Connor on the right and Ben Meyers at center. He replaced an injured Andrew Cogliano on that line.

Malgin had three shots in 16:21 and meshed well with his linemates, giving Bednar an energy line to use throughout the evening. He also was called for slashing in the third period, Colorado’s only penalty of the game, which was killed off successfully.

“He looked like a confident player with the puck,” Bednar said. “He was making plays and was responsible on the defensive side of it. I thought he got better as the game went on.”

Rantanen added: “I thought he was skating well he’s a really skilled guy as we can see. Even with his small size, he can still win battles. And I thought he had a really good debut.”

It was another strong showing for goalie Alexandar Georgiev between the pipes. Georgiev made his third consecutive start, winning all three, and surrendering just two goals in the process. Coming off a 26-save shutout against the New York Islanders on Monday, Georgiev surrendered a goal on the first shot he faced — a breakaway just 1:48 into the first period from Montreal’s Anthony Richard. The Canadiens were unable to get another one past him. Their best chance came later in the first where they beat the goalie but hit the post.

Georgiev stopped 11-of-12 shots in the opening 20 minutes before stopping the eight he faced the rest of the way.