Fix several broken unit tests.