Fix template key variable