Fix template problems.