fix some sensor bugs