Fix an error with charger during compiling