fix a bug to transfer image to another device.