Fix crash with device name