minor fixes, more tests