LILY-439: Fix template variables not working