Fix template bugs.