Some minor untested fixes