Context compatibility for 2.7 to 3.4