TOKYO/TAIPEI (Reuters) - The Japanese manufacturer of a train that derailed in Taiwan killing 18 people said it had discovered a design flaw that failed to alert the central control system that an automatic safety feature had been turned off.

On Oct. 21 a train in Yilan in Taiwan’s northeast came off the rails on a curve while traveling at almost 149 kmh (87 mph), nearly twice the speed limit, the head of a Taiwan government investigation team has said.

Eighteen people were killed and 187 injured in the island’s worst rail crash in decades.

Naoki Sato, an official at Nippon Sharyo, told Reuters on Friday that the company’s investigation into the crash had discovered a flaw in the blueprint for wiring the connection of the train’s automatic train protection (ATP) safety system to the control station.

There is no problem with the safety system itself, which is designed to automatically apply the brakes when the train exceeds the speed limit, the official said.

Nippon Sharyo’s Sato said the flawed blueprint was used in 19 train sets built for Taiwan, including the one that crashed. He said any decision on whether to fix the wiring was up to the Taiwan rail authority, which owns the trains.

The Taiwan Railways Administration said in a statement it has asked Nippon Sharyo for a more detailed explanation. It did not elaborate. It was not immediately clear whether the remaining 18 trains were currently in operation.

The train’s driver, You Zhen-zhong, told a court last month he switched off the speed-control system to boost the train’s power when it slowed down on an earlier stretch of the journey, according to a Taiwan court spokesman, citing his bail hearing.

The public defender for You said he knew he had to turn the protection system back on but failed to do so because he was busy communicating with other coordinators about a separate problem with the train’s speed.

Shares in train manufacturer Nippon Sharyo Ltd plunged by the daily limit in Tokyo, losing 17 percent to a near-2-1/2-year low, after news of the design flaw.