Fix editing of devices