fixup various bugs in the tests