Bugfixes from rerunning all tests.