Fix make_template cli factory

I should have make one PR with this PR changes and #468