tests and fixup