Fix template check.