TORONTO - It wasn't the prettiest effort the Toronto Maple Leafs have put on the ice lately. Against the struggling Dallas Stars, though, it was more than enough.

The Leafs played a turnover, mistake and penalty-filled game, but their offence kept clicking on the way to a 5-3 victory on Tuesday night. Toronto won for the fourth time in the past five games and has picked up nine out of a possible 10 points in that period.

"I think we're just a pretty confident group in here," said Tyler Bozak, who scored his 12th goal of the season 27 seconds in. "Every line's producing, every player's stepping up and playing well and we're getting full team efforts most of the nights."

In addition to Bozak's quick strike, Joffrey Lupul scored twice and Phil Kessel ended his goal drought at five games. Nazem Kadri also scored for the Leafs (13-8-3), who haven't lost at home since getting thrashed by the Nashville Predators on Nov. 18.

Since back-to-back losses to the Buffalo Sabres and Predators by a combined score of 15-4, Toronto has outscored opponents 23-12.

"We still got plenty to work on," Lupul said. "Obviously things are headed in the right direction, but we know what can happen if you get complacent."

The Leafs did get complacent at times, and that led to goals by Jason Spezza, Ryan Garbutt and Ales Hemsky. Coach Randy Carlyle wasn't terribly thrilled with the defensive performance, but he also wasn't eager to poke holes in a two-goal victory.

"We're going to take the two points, but we can't be happy with the sloppiness with which we played," Carlyle said "We cannot continue to play that style of game and think we're going to have success."

The Stars (9-11-5) know that all too well. Predicted to be among the big boys in the Western Conference, they've been unable to find consistency this season. That continued in Toronto, where turnovers led to a third-straight loss.

"It's just not playing the right way," captain Jamie Benn said. "We've got to get it in our heads that it's got to go straight up the ice, it's got to be direct. That's the way we're going to win hockey games."

The Leafs will take winning hockey games any way possible, especially at Air Canada Centre. They jumped out to a 3-0 lead, and they never led by fewer than two goals the rest of the way.

"We were definitely having to play catch-up all night," Stars winger Erik Cole said. "It's hard enough to win games without spotting them two and three-goal leads."

Because of that, players might have subconsciously let up. Goaltender Jonathan Bernier, who stopped 35 of the 38 shots he faced, said it was the Leafs' worst game in their recent stretch.

"When you score that many goals, it's hard mentally to stay sharp and play defensively," Bernier said. "But we got the two points, and that's what matters."

How they got the goals should be a source of positives for the Leafs. Bozak's goal temporarily gave him the team lead, but then Kessel scored on the power play for his first since Nov. 15 in Buffalo.

"He's going to get his goals," Bozak said of Kessel. "I'm sure he's been not happy with the way it's been going for him lately. I'm sure he's going to start streaking here pretty soon and put a pile of them in there."

Stars`Kari Lehtonen gave up five goals on 40 shots in the loss.

Lupul's goals gave him three in three games since returning from a broken bone in his right hand. With him producing, the Leafs have better offensive balance.

"I think the first couple games he was trying to do too much and playing as an individual, lots of turnovers," Carlyle said of Lupul. "I think in some situations he's got to get away from being that individual and let the puck do the work. But it's not because of lack of effort, that's for sure. He's out there trying and you can see his commitment."

The Leafs' commitment has been on display of late, seemingly sparked by the blowout losses in the middle of November. The finer points of hockey may not have been there, but they'll carry a two-game winning streak into Thursday's game against the New Jersey Devils.

"Both coaches aren't going to be happy with their teams," Carlyle said. "Just that we're going to be happy because we got two points and we found a way to score some goals."

Notes — Leo Komarov missed the game three days after taking a hit to the head. The gritty forward did not practice Monday or Tuesday, but coach Randy Carlyle said Komarov's symptoms had subsided and that he didn't believe his absence to be a long-term one. ... Stars winger Patrick Eaves left the game in pain during the second period after blocking a shot. He did not return. ... The Leafs went 5 for 5 on the penalty kill, including 1:30 of a five-on-three Stars power play in the third period.

---

Follow @SWhyno on Twitter