Fix a bunch of unit test problems.