fix set_context calls