Fixed problems with test case