fix some unit tests