Battery backup and charging problem