Fix template filling.