CompareAndSet fix in memachedSevice