EDISON, N.J. (WPIX) — A school bus driver in New Jersey is being called a hero after her quick thinking prevented a bad situation from becoming much worse.

Police said two students suffered minor injuries after the school bus crashed into a home in Edison on Wednesday morning. A preliminary investigation of the crash indicated that the brakes failed, authorities said.

“I think that the school bus driver should be referred to as a hero here,” said Edison Police Chief Thomas Bryan.

For the 28 students on board, it was a normal Wednesday bus ride to John Adams Middle School in Edison. They were about a mile or so out from school when the bus driver tried to stop at an intersection, but the brakes failed, police said.

Home surveillance video shows the bus crashing into a fence, then clipping the garage of a home before coming to a rest in the grass.

“It was incredible what she did,” said Edison police officer Evan McNamara. “She avoided many houses. It could have been a lot worse, she did a very good job.”

Police said three cleaning workers inside the home at the time were unharmed, officials said.

“My heart went out for those kids,” said neighbor Rachel Endress. “I wanted there to be no kids on the bus but there happened to be.”

“Thoughts and prayers go out to the bus driver and everyone involved,” added neighbor Matthew Junio.

School officials said the children were left shaken, but Edison Police therapy dog Tybee, a 10-month-old golden retriever, helped to ease them.

“The kids were so incredible,” said Sgt. Melissa Michalik, Tybee’s owner. “To see them smiling, engaging, hugging, petting the dog, it was so heartwarming.”

The house that was struck by the bus has been condemned, police say, and the family living there has been displaced.

School officials said the school bus company is one of a few companies they contract to run some of their routes. They say they will meet internally about the next steps.

The bus itself will be examined by the New Jersey Motor Vehicle Commission, police said.