Fixed the incorrect check, of the amount of devices