fix bugs on part of sensor