Lithium battery shutdown protection