clean up stateManager