Fix template file