Fix context permissions and other memcache issues