All but six of the 153 articulated buses pulled from service amid a safety concern on Thursday night were back picking up commuters this morning.

On Thursday night the TTC took its entire fleet of 153 articulated buses off the roads after a suspected software error caused one of the vehicles to inexplicably speed up as the operator returned it to a storage yard in Scarborough.

Following the removal of the vehicles from service, TTC crews worked through the night to apply a “software patch” that was recommended by the manufacturer, NovaBus.

By 6 a.m., 147 of the buses had been returned to the roads, allowing normal service to resume in time for rush hour. The six other buses that remain out of service were already down for unrelated maintenance work.

“With the fleet grounded, TTC and Nova staff worked through the night to ensure the fleet was safe,” TTC Spokesperson Brad Ross said in a message posted to Twitter on Friday morning. “Safety of our employees, you, and all road users remains paramount in all we do.”

The TTC had previously said that most of the buses would not return to service until after the morning rush hour but they ended up being back picking up commuters ahead of schedule.

In a statement issued on Friday afternoon, NovaBus said that is continuing to investigate and is working to determine whether other TTC buses also require the software patch.

“We want to thanks our customer, the TTC, who has been very proactive. Our work demonstrates we both care for the public, the passengers and the drivers,” the statement said.

The articulated buses operate on several routes across the city -- Bathurst, Dufferin, Finch West, Sheppard East, Steeles Express and Keele.