Fixed bug in device provider