Attempt to handle malformed submission templates (fix #119)