fixed a final bug in the test cases