added ThreadUnsafeScopedState;