Fix the temperature read function