Fixed template generation