Fixed the error when no thermodynamic states are detected