Fix bug in batch extension.
Added the ability to assign template variables using the insert() method.