Fixed bug in test case