Draft templates: slight changes to fix bugs and improve fault tolerance.