Fix NPE on startup when no template engine is configured