fixed some failed test cases.