fixed a bug: prevented $devices array from having an empty array as the first element
Merge pull request #2 from mahmoodkhan/master

fixed a bug: prevented $devices array from having an empty array as the first element