Fix unit tests partly.