fixes for unit tests
WIP