Fixed negative temperature bug