Added thread local context.