Samsung has now confirmed the findings of an internal investigation into the Galaxy Note 7’s overheating issues — and it seems bad luck played an important part. The South Korean company discovered not one but two problems with the batteries it used.

As many predicted, the problem was not caused by the Note 7 itself, Samsung says.

One of the issues was a design flaw with its first batch of batteries, which made their electrodes prone to bending and in some cases led to a breakdown in the separation between the positive and negative tabs.

This not only caused a short circuit, but also made the batteries overheat and in some cases explode. This is why Samsung had no choice but to issue two recalls for the Note 7, and eventually cease production just a few months after it made its debut.

The second issue, which affected another batch of batteries Samsung ordered from a second supplier, was a welding defect that also led to short circuits.

“It was a very painful period, but in a couple of months we learned a lot,” Samsung mobile head DJ Koh told Recode. “I wish [that] this serves as an opportunity to improve safety of lithium-ion not only for Samsung but for the entire industry.”

Samsung says it accepts full responsibility for the components used in the Note 7 — including the batteries made by both its subsidiary company, Samsung SDI, and those sourced from third-party manufacturers.

Samsung adds that even though its suppliers were under great pressure to produce enough batteries for the Note 7, it does not blame overwhelming demand. However, it also says that if there were no problems with “battery A,” “battery B” would have likely been just fine.

“The issues with battery B, Samsung said, were tied to the fact that the supplier tried to quickly increase its production after battery A was pulled off the market,” Recode explains. ”

Samsung’s investigation was taken incredibly seriously, and required 700 staff who tested 200,000 phones and 30,000 additional batteries. Samsung also brought in three independent firms to investigate and validate its findings.

This should be enough to convince most fans that Samsung has gone above and beyond to identify the root cause of this issue and ensure it doesn’t affect future devices. Its next big release will be the Galaxy S8 this spring. It’s still unclear if there will be a Galaxy Note 8.