HARRISBURG, Pa. (AP) — Federal investigators say crews encountered air brake problems before a 178-car freight train derailed in Pennsylvania nearly three weeks ago, causing hazardous material to ignite and requiring neighbors to evacuate.

The National Transportation Safety Board’s preliminary report issued Monday says a crew stopped the CSX Transportation train before the Aug. 2 wreck, applied 58 hand brakes and recharged the air brakes.

The report says that after their shift was over, a second crew thought the train might still have air brake problems and kept the hand brakes on but wasn’t able to move the train down a hill near the borough of Hyndman.

The report says the engineer switched from locomotive power to dynamic braking three times before one car derailed about 1.7 miles before the larger derailment and fire.