fix segmentation fault if device is off