fixed some unit test problems