Fix template issue for variants