[Issue #133] Prevent crash for nonexistent device
Fixing warnings