Fix crash unplugging when usb/charger