DETROIT (AP) — The Detroit Red Wings were putting the puck everywhere other than into the net for two-plus periods. They were shooting off the post, across the crease and firing wide on chances.

Luke Glendening broke a scoreless tie late in the second period and Tomas Tatar scored a go-ahead goal midway through third and the Red Wings went on to beat the Buffalo Sabres 3-1 on Friday night.

“With all the chances we were getting and not scoring, it could’ve been one of those games that haunted us,” Glendening said. “We played smart and stuck with it and it paid off.”

Dylan Larkin scored late in the game to seal the victory and Jimmy Howard had 19 saves for the Red Wings. They have won consecutive games at home for the first time this season, showing Little Caesars Arena is starting to provide a home-ice advantage.

“It is starting to feel like home,” Glendening said.

Ryan O’Reilly pulled Buffalo into a 1-all tie 5:50 into the third before ending with a familiar result.

“We are embarrassed by this,” O’Reilly said. “We have to play with a much better effort that we showed.”

Robin Lehner gave his struggling team a chance, stopping the first 20 shots he faced and finishing with 30 saves.

“Robin is a very good goalie, who I got to know working out together last summer,” Howard said. “He’s a great competitor, who doesn’t quit.”

The Sabres have lost four straight, one away from their longest losing streak of the season, but were thankful they didn’t lose more than a game in Detroit.

Jack Eichel went to the dressing room late in the second period after coming off the ice slowly, keeping weight off his right skate following a collision with Glendening, and making a brief stop on the bench. Buffalo’s standout center was cleared to return at the start of the third period.

Eichel said he felt fine after the game, but he wasn’t happy with his team’s effort.

“They came at us in waves,” he said. “We know they have speed, but we didn’t respond to it. You have to be a strong forechecking team against them, and we just let them get the puck out of their zone with no problems at all.”

After a scoreless first period with a combined 14 shots, Detroit outshot…