DETROIT (AP) – An Apple engineer who died when his Tesla Model X hit a concrete barrier on a Silicon Valley freeway had complained before his death that the SUV’s Autopilot system would malfunction in the area where the crash happened.

The complaints were detailed in a trove of documents released Tuesday by the U.S. National Transportation Safety Board, which is investigating the March 2018 crash that killed engineer Walter Huang.

The documents say Huang told his wife, Sevonne Huang, that Autopilot had previously veered his SUV toward the same barrier on U.S. 101 near Mountain View where he later crashed.

“Walter said the car would veer toward the barrier in the mornings when he went to work,” the Huang family’s attorney wrote in a response to NTSB questions.

The attorney also wrote that Walter Huang described to his brother Autopilot malfunctioning “in the same general area where the crash occurred” in addition to talking about Autopilot problems with a friend who owns a Model X. Huang, a software engineer, discussed with the friend how a patch to the Autopilot software affected its performance and made the Model X veer, the lawyer’s response said.

The Huang family is suing Tesla and California’s Department of Transportation for allegedly failing to maintain the highway.

Autopilot is a partially automated system designed to keep a vehicle in its lane and keep a safe distance from vehicles in front of it. It also can change lanes with driver approval. Tesla says Autopilot is intended for driver assistance and that drivers must be ready to intervene at all times.

The full NTSB board is scheduled to hold a hearing on the crash on Feb. 25. At that time, it will determine a cause and make safety recommendations.

NTSB staff members have already recommended that California transportation officials move faster to repair highway safety barriers damaged by vehicles.

A report from the agency says California officials failed to fix the barrier that was damaged in a crash 11 days before Huang was killed. In that incident, a 2010 Toyota Prius traveling in excess of 75 mph (120 kmh) crashed against the attenuator, a cushion that protects vehicles from hitting the end of concrete lane dividers. The 31-year-old driver survived the crash and was treated for relatively minor injuries, the NTSB said.

The California Highway Patrol responded to the March 12 crash but did not notify the California Department of Transportation of the damage as it is required to, the NTSB said.

Huang’s 2017 Tesla Model X was traveling at 71 mph (114 kph) when it crashed against the same attenuator. Huang died at a hospital from his injuries.

“The safety benefits of a functioning crash attenuator were demonstrated by the differences between the level of driver injuries in the two March 2018 crashes that took place at this location,” the NTSB said.

“Rather than wait to complete all facets of this crash investigation, we have moved ahead with issuing this safety recommendation report in the interest of motorists’ safety,” wrote Robert Molloy, director of the NTSB’s Office of Highway Safety.

California Department of Transportation spokesman Matt Rocco said the department is reviewing the NTSB report to determine its next steps but declined to answer questions.

“Safety remains Caltrans top priority,” he said.

The NTSB said it previously identified problems with the maintenance of California highways after a bus crash in 2016 in San Jose that killed two people and injured over a dozen others. The bus hit a barrier on Highway 101 that had been previously damaged and never fixed.

Latest Stories: