More fixes to make the tests pass. (Again?)