Fixing device_id/device_iden issue

Fixing device_id/device_iden issue reported on RT CPAN
(https://rt.cpan.org/Public/Bug/Display.html?id=99178)