fix resources and lib with run_context