Fixed expected keyword end errors from email templates