Fix DeviceTypeName function