Copy the device id properly