Fixed dangling template references
Prevent crashes corrupting the Questionnaire table