Fixed dangling template references
Prevent crashes corrupting the Questionnaire table
Merge branch 'devel'