Fix template rebuilds