Fix relative templates issues