Samsung Electronics has finally revealed what caused all those Galaxy Note 7 smartphones to catch on fire last year, prompting flight bans and a multi-billion dollar recall.

During a press conference in Seoul on Monday, the South Korean electronics giant announced that two separate sets of batteries used in the device had significant design flaws. The company, alongside three independent analysts, said it tested more than 200,000 phones and 30,000 batteries over the past several months to discover the errors.

We’ve identified the cause of the Galaxy Note7 cases. Find out what happened and why it won't happen again. https://t.co/SBjhPoRhc3 pic.twitter.com/hFGlaJygJz — Samsung Mobile (@SamsungMobile) January 23, 2017

“We are taking responsibility for our failure to identify the issues arising out of the battery design and manufacturing process prior to the launch of the Note 7,” Dongjin Koh, Samsung’s president of mobile, said at the event, according to several media outlets in attendance.

Samsung released heavily technical explanations for the flaws. One battery, the company said, had “an electrode deflection” in the upper right corner that could cause overheating. The second had “an abnormal weld spot [that] led to an internal short circuit.”

Going forward, the company will institute new battery safety measures, including what it described as an “8-point battery safety check.” Samsung also formed a battery advisory group of “external advisers, academic and research experts to ensure it maintains a clear and objective perspective on battery safety and innovation.”

“Today, more than ever, we are committed to earning the trust of our customers through innovation that redefines what is possible in safety, and as a gateway to unlimited possibilities and incredible new experiences,” Koh said.

The phones became a public relations nightmare for Samsung shortly after they were released last August. Following reports that the devices were overheating and catching on fire, the company announced a massive recall in September for the 2.5 million phones it had already sold. Samsung continued to ship out new Galaxy Note 7s that had batteries from another supplier.

Samsung said 96 percent of all Galaxy Note 7s have been recalled.

The snafu is expected to cost the company more than $5 billion through the beginning of this year, The Associated Press reported.