unit tests: fix some issues