BugFix
Fix bugs
Adjust test cases