fixed an error in the code when no memcache server is available