EDISON, N.J. (PIX11) — 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 on Rahway Road in Edison 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 on Rahway Road, 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,” said neighbor Matthew Junio.

School officials said the children were left shaken, but with the help of Edison Police therapy dog Tybee, a 10-month-old golden retriever, their minds were put more at ease.

“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.”

Police said the house is condemned and the family 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.

Police said the school bus will be examined by the New Jersey Motor Vehicle Commission.