include merge head in template
fix regression if merge_head is None