Fixed copying the context.