Some fixes in memcache adapter