bug fixing in cloning