do deep copy before creating CloudClient

@techhat ping