fix the test code