fixes injection of templating engine

This PR fixes issue noted by @jimmycleuren in my #1