Fix #307 and #383 — Add missing template