Restore register name in templates