[TIMOB-17604] Fixed a few bugs with handling bad device ids and all devices.