various fixups - issue #291