more fixes, more tests