 
   run_in_context = (run_context, string) ->
     try
+      previous_running_context_binding = running_context_binding
+      running_context_binding = run_context
       context_scope = scope run_context
       `with (context_scope) {`
       result = (-> eval string).call run_context

    bind_fn = (name, op) ->
      bound = (args...) ->
        # if the function returned a value, unwrap it. otherwise, ignore it
        op.fn.apply(run_context.root_context.current_context, args)?._lead_context_fn_value ? ignore
      bound._lead_context_fn = op
      bound._lead_context_name = name
      bound

      else
        run_context[name] = mod
    run_context.current_context = run_context

    run_context

