Fix bugs in tester