Fix make_template cli factory

I should have made one PR with this PR changes and #468. Because the other has already an ACK I decided to create a new one.

This should fix two errors based on the last build.