Fix thermal calculation bug.

Line 316 is important! and needs to be merged into the simba executable