fixed bug in clone