fixing a bug inside test case