fixed a bug in test case