some fixes, some more test cases