some more tests and some fixes