Fixed a heat flux bug