various bugfixes as discovered by internal UAT