Mistake when building template