fix recursive clone