fix memcached implementation