fixed some unit test issues