Fix another bug in batt.py