Some unit-tests fixes