bugfix for source of stateTerms