Fixing bugs in unit tests.