fixed bug in test and testcase