Fixed: thermal energy goes negative, see #141