fix bug in test case