Fix some of the unittests, at least.