Fixes to memcached support