fixed bugs in the test driver