small tweaking in sensor.c