BOSTON — While the Toronto Maple Leafs’ goaltender switch from Vesa Toskala to Curtis Joseph went so awry tonight that head coach Ron Wilson actually switched back to Toskala before the third period, Boston Bruins head coach Claude Julien’s goaltender swap was  just  what the doctor ordered.

Although more than half of Toronto’s five goals that eluded Bruins starter Tim Thomas went off other players’ body parts (including one of Bruins defenseman Mark Stuart’s hand), it was obviously a rough night for the All-Star. So Julien called on Manny Fernandez for the third period, and the Bruins’ other goalie responded with 13 saves to close out the Bruins’ 8-5 win over Toronto at TD Banknorth Garden.

“You just kind of have to get ready for anything,”  said Fernandez after he played Jonathan Papelbon to Thomas’ Josh Beckett. “But it’s been kind of steady leaving the one guy in. So part of my job is to get ready in case that happens and if it doesn’t it doesn’t. Thank God I had at least the break between the second and third to kind of get my gear ready and try to get as ready mentally as possible.”

Julien said that he made the move not to punish Thomas but to change the momentum of the game, which had swung Toronto’s way after the Leafs turned a 5-1 deficit to a 6-5 margin with just one period left to play. Thomas understood the move and chalked it up to just one of thos nights.

“(I’m) angry at circumstance. It’s one of those days like you’ve got to be kidding me,” said Thomas, who became the first Bruins goaltender pulled this season. “It happens. It happens to everybody. But when it happens to a goalie, everybody notices. Forwards and D have those games and the puck starts bouncing everywhere away from them and it can be hidden a little bit.”

While we’re on the subject of pulling goalies, Bruins opponents have now yanked their starters six times — including the two pulls tonight — since Nov. 19.