fix bugs in test file