Added some devices and fix infinite loop