fix history cloning bug