Fixed issues in unit tests.