fix some unit test errors