rearranged code to try to get reset working, when battery is slowly recharging from dead