Debug: Fix bug that makes app crash when no device is selected