Finally fixed bug in temperature