fixed a crash when only 1 device is returned