Fix possible exception when no sensors are plugged in