Fixed bug in leddevice factory