fix bugs in testit