fix DeviceHistory creation