avoiding deep discharges