bug fixes mostly relating to forms/templating