Fix more templates by writing more tests.