more tests, small fixes