Fix devices not being detected when only one device is available