Fix for embedded templates