fixed various unit tests.