Merge "Fix battery history management."