fix bug @ calc_temperature