builddevice: fix the fix, used wrong variable