Bug fix for test case