Properly return 404 when a template is not found