Tests and partial fix for decreasing thermal energy, see #141