fix bugs
fix bugs; more test case