small fixes
JUnit tests.