temperature not calculated correctly