Fixed auto-builder for templates