just replaced everything in main.ejs with a directive template. it seems to have worked