Fixed some unit test errors