a few more tests and fixes