fix bug in move-device command