more tests, more fixes