fixed bug with test case