Fixed some bugs in the heating system related to negative temperatures.