Fixed some errors in unit tests.