Bug fix in clone() method