convert the device object to a temporary device before deleting it