Fixed bug in GFI templating