Fixing variable reference in device.pp