Merge "Fix battery history corruption"