minor fixes to template/serialise