Corrected a possible source of NaN in heating

Also small modification of iterative Tdust calculation