Fixed a bug when the temperatur is negative