Bug fixes for sensors