fixed memcache issues and other small fixes