fix template rename parameters not cloned