fix get-template-for to read metas correctly for template key