Fix directive templating