Modified scripting to work with grammar template, worked fine