fix template merge issue