fixes in context variables for email templates