fix the device numbers in the device popup menu