Fixed modify_devices.