fix cache tree clone fn