more tests, minor fixes