lots of bugfixes in the sensor area