fix several testcases