bugfix for state-export