fix the thermodynamic potential mistakes