autosign: fix variable access in template