Context cleanup for 2.7