Fixes to some unit tests