Li-ion battery protection