prevent battery overfilling