Fixed typo in variable names
Automatically set the event template