Fixed broken ralph_device_id while saving history