Fix template watcher and generator.