Fixed segfault problem in clone interface