more tests, some fixes