Fixes for unit test