Fixed bug in clone()