Merge "Fix NPE caused by a null battery history tag"