Fix namespaces in templates

another one on #160