fixed bug in test case