Yes, the early problem was with the lithium ion (I think I have that terminology right) batteries, but not the airframe. The most recent airframe problems could be due to the rigid quality control requirements required of composite manufacturing. There is little margin for error when producing a composite structure, it all has to be spot on.
Cheers,
Grog