Small fixes to ensure tests run correctly.