bug fixes for temperature sensing