Fix unit tests of cloning