Fixed a bunch of test failures