some fixes for mean temp. calculation