fix global contexts